Answers to Pandas value counts save output to file ( 1 )

  1. 2017-08-08 23:08

    One way would be to use reset_index and then to_csv

    df['key'].value_counts().reset_index().to_csv('df.csv')
    

Leave a reply to - Pandas value counts save output to file

◀ Go back