0

I have sorted my data frame based on date and then pivot the dataframe, but the pivoted dataframe is not in the order I asked before. It has Dates not in the order.

df1= df1.sort_values(by=['DATE'])

df2=df1.pivot(index='CLIENT', columns=('VISIT_N'), values='DATE')

Can you please help?

David Buck
  • 3,752
  • 35
  • 31
  • 35
NData
  • 59
  • 1
  • 7
  • Pandas questions are easlier if you can include a [reproducible sample of data](https://stackoverflow.com/questions/20109391/how-to-make-good-reproducible-pandas-examples) – David Buck Nov 09 '19 at 22:32
  • Anobody knows what should be done? – NData Nov 11 '19 at 12:10

0 Answers0