I have two dataframes 'ds' and 'df'
ds-outcome of Selenium Parser Which Constantly loops and have dynamic dataset with columns(Date, Price, id) id is static But Price and Date are Dynamic
df-SQL Database To where Values From 'ds' should be written to
- I need To Write Values From 'ds' to 'df'
- Also need update values in 'df' if those values changed in 'ds'
- If new values are in 'ds' append those values to 'df'
Extra
If any one knows how to perform this operation using psycopg2 or sqlalchemy
Example:
import pandas as pd
ds = pd.read_csv("Info(Parser).csv")
df = pd.read_csv("Info(SQL).csv")
for idx, val in enumerate(df['id']):
if val in ds['id']:
(How To Update True Values?)
else:
(How to append only False Values?)
Aucun commentaire:
Enregistrer un commentaire