pd join fixed

This commit is contained in:
2024-06-14 23:46:38 +09:00
parent c6c8385253
commit d53694a0b3

View File

@ -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'))