How to add filters to Python Pandas Pivot table?
I’m trying to recreate a Pivot table I made in Excel in Python using Pandas library. There’s over 500K lines of OD total trips data that I’m trying to summarize with time period as the filter. On Excel I would just do row(O), column(D), values(trips), filter(time). So far on Python, I just have index, columns, values, aggfunc, but I don’t know how to filter. There’s 12 time periods and I only want to include 3.
How to add filters to python pandas pivot table? (pd.read_excel)
I’m trying to recreate a pivot table I made in Excel in python using pandas library. There’s over 500k lines of OD total trips data that I’m trying to summarize with time period as the filter. On excel I would just do row(O), column(D), values(trips), filter(time). So far on python I just have index, columns, values, aggfunc, but I don’t know how to filter. There’s 12 time periods and I only want to include 3.