Skip to content

update gives no such table error #83

@SteveScott

Description

@SteveScott

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions