jamescooper
Well-known Member
- Joined
- Sep 8, 2014
- Messages
- 886
My following code works nicely but I'd like to be able to sort axis 1 ascending, adding the bold doesn't work; any ideas?
import pandas as pd
filtered_df = df[df['Hotel Name'] == 'Leonardo Hotel']
ct_mean = pd.crosstab(filtered_df['Check-In'], filtered_df['Date Captured'], values=filtered_df['Current price'], aggfunc='min')
.fillna('')
.sort_index(axis=1, ascending=False)
import pandas as pd
filtered_df = df[df['Hotel Name'] == 'Leonardo Hotel']
ct_mean = pd.crosstab(filtered_df['Check-In'], filtered_df['Date Captured'], values=filtered_df['Current price'], aggfunc='min')
.fillna('')
.sort_index(axis=1, ascending=False)