pivot_table set column as hour and index as date for a new dataframe
pivot_table set column as hour and index as date for a new dataframe Question: I need to get a new dataframe from a massive dataset so I am using pivot_table: date is like 2020-12-31 09:00:00 And I need to show something like this: import pandas as pd import datetime as dt pd.pivot_table(df_fuel, index=["date"].dt.date, columns=["date"].dt.hour, values=["Fuel_price"]) …