Browse Source

pd join fixed

master
VinokurovVE 12 months ago
parent
commit
d53694a0b3
  1. 2
      backend_fastapi/general.py

2
backend_fastapi/general.py

@ -23,4 +23,4 @@ async def get_report() -> None:
df_values= pd.DataFrame(data=values) df_values= pd.DataFrame(data=values)
df_objects= pd.DataFrame(data=objects) df_objects= pd.DataFrame(data=objects)
df_type = df_values['id_param'].where(df_values['id_param'] == 3).notnull() df_type = df_values['id_param'].where(df_values['id_param'] == 3).notnull()
print(df_values[["id_object","value"]][df_type])
print(df_values[["id_object","value"]][df_type].set_index("id_object").join(df_objects[["id","id_city"]].set_index("id"),how='inner'))
Loading…
Cancel
Save