jamescooper
Well-known Member
- Joined
- Sep 8, 2014
- Messages
- 886
I have the following crosstab working returning the max values.
import pandas as pd
ct_mean = pd.crosstab(df['Check-In'], df['Date Captured'],
values=df['Current price'], aggfunc='max')
Now want to add another variable: Hotel Name column needs to be equal to "A" (for example).
How would I add this variable to the code above?
Many thanks.
import pandas as pd
ct_mean = pd.crosstab(df['Check-In'], df['Date Captured'],
values=df['Current price'], aggfunc='max')
Now want to add another variable: Hotel Name column needs to be equal to "A" (for example).
How would I add this variable to the code above?
Many thanks.