Meta = Metadata (engine, schema = 'data_quality') meta.frack (engine, schema = 'data_quality') = pdsql = pd .io (engine: password = localhost: 5432 / db ') = engine = making_aizin (r'postgresql: // user: password @ localhost: 5432 / db') .sql.PandasSQLAlchemy (engine, meta = meta) pdsql.to_sql (dataframe, table_name)
This was working perfectly, but now SQLAlchemy is in the 5th line The following error is throwing:
attributeError: There is no attribute in the 'module' object 'pandasclaimy'
I'm not sure that it is related, But Panda broke at the same time - actually like this google-api-python-client problem:
I have installed google-api-python-client yesterday and The problem with Pandya has been fixed by uninstalling it, but SQLAlchemy still does not work.
I think you are using Panda 0.15 PandasSQLAlchemy
yet In fact, it was not public, and its name was changed from 0.15 to SQLDatabase
in Panda. So if you change it in your code, then it should work (hence the pdsql = pd.io.sql.SQLDatabase (engine, meta = meta)
).
However, starting with panda 0.15, read_sql_table
and to_sql
function also has schema support, so it's called metadata and < Code> must not be required to create SQLDatabase
object manually. Instead, it should:
dataframe.to_sql (table_name, engine, schema = 'data_quality')
0.15 See the release notes:
Comments
Post a Comment