-
Notifications
You must be signed in to change notification settings - Fork 187
Open
Description
I try the following code:
daily_df = pd.DataFrame({'date': [1, 2, 3, 4, 5], 'visitor_count': [10, 20, 30, 40, 50] }) row_df = pd.DataFrame({'date': [1, 2, 3], 'visitor_count': [60, 70, 80]}) column_name = 'visitor_count' test = sqldf("SELECT * FROM daily_df") sqldf("UPDATE daily_df SET {} = row_df.{} WHERE date = row_df.date;".format(column_name, column_name), globals())
The select statement works. the update statement fails and says there is no such table. If you can read a dataframe as a table, shouldn't you be able to write to a dataframe as if it were a table?
Metadata
Metadata
Assignees
Labels
No labels