Python Forum
add database rows to dataframe
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
add database rows to dataframe
#3
This is the error
"pandas.io.sql.DatabaseEror: Execution failed on sql"

What I need to accomplish is loop through the data in a csv file.
take two of the columns and use them in my sql statement, then execute the sql.
Using SQL Server, pyodbc
This requires an new database connection for each row in the file, unless there is a way to do it all with one connection.
then I need to return each result to a new csv file.

Any advice will be greatly appreciated.
Reply


Messages In This Thread
add database rows to dataframe - by cspower - Jan-23-2020, 06:37 PM
RE: add database rows to dataframe - by ibreeden - Jan-24-2020, 12:54 PM
RE: add database rows to dataframe - by cspower - Jan-24-2020, 09:55 PM
RE: add database rows to dataframe - by ibreeden - Jan-25-2020, 09:45 AM
RE: add database rows to dataframe - by cspower - Jan-27-2020, 02:48 PM
RE: add database rows to dataframe - by cspower - Jan-27-2020, 07:25 PM
RE: add database rows to dataframe - by ibreeden - Jan-27-2020, 07:27 PM
RE: add database rows to dataframe - by cspower - Jan-27-2020, 09:28 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Rows not adding to sqlite3 database using SQLAlchemy Calab 11 2,092 Jun-02-2023, 05:53 PM
Last Post: bowlofred
  Converting a json file to a dataframe with rows and columns eyavuz21 13 5,448 Jan-29-2023, 03:59 PM
Last Post: eyavuz21
  How to assign a value to pandas dataframe column rows based on a condition klllmmm 0 982 Sep-08-2022, 06:32 AM
Last Post: klllmmm
  The code I have written removes the desired number of rows, but wrong rows Jdesi1983 0 1,712 Dec-08-2021, 04:42 AM
Last Post: Jdesi1983
  Partial Matching Rows In Pandas DataFrame Query eddywinch82 1 2,497 Jul-08-2021, 06:32 PM
Last Post: eddywinch82
  Pandas DataFrame combine rows by column value, where Date Rows are NULL rhat398 0 2,210 May-04-2021, 10:51 PM
Last Post: rhat398
  Indexing [::-1] to Reverse ALL 2D Array Rows, ALL 3D, 4D Array Columns & Rows Python Jeremy7 8 7,594 Mar-02-2021, 01:54 AM
Last Post: Jeremy7
Question Dataframe Manipulation Coping Rows and Removing Dates ashleysnl 1 1,868 Feb-26-2021, 10:00 PM
Last Post: nilamo
  How to split dataframe object rows to columns Mekala 1 2,709 Nov-12-2020, 04:18 PM
Last Post: michael1789
  Adding loop results as rows in dataframe Shreya10o 2 2,325 May-09-2020, 11:00 AM
Last Post: Shreya10o

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020