Replace a column in postgres table with pandas column using sqlalchemy

414
March 24, 2017, at 05:32 AM

I have a postgres table that I read into a pandas DataFrame. I then apply some functions that change all values in 1 column to other values. I need to find a way to then update the corresponding column in the postgres table. Is there a straightforward way of doing this? The basic workflow I need is like:

df = pd.read_sql(...)
df.col_to_update = apply_some_functions_to_col(df.col_to_update)
sa.update(tbl).values({"col_to_update": df.col_to_udpate})

Though this particular statement wouldn't work because the API here doesn't understand pandas series.

READ ALSO
find_packages doesn't find my Python file

find_packages doesn't find my Python file

I have a directory tree like this:

409
Categorical Complications for DNNRegressor

Categorical Complications for DNNRegressor

I am working with a set of data like the following

421
Is it possible, in Django with Mongo (using pymongo) as a back end for data, to build nested formsets?

Is it possible, in Django with Mongo (using pymongo) as a back end for data, to build nested formsets?

I would like to build a set of nested forms with Django and I believe I will have to use nested inline formsets, but nothing like that is covered in the documentation

264
Python Portable Install gives error

Python Portable Install gives error

i am starting to use Databases and am using MariaDB, Got that ready, but i want Python integration so i can get started on the program

480