Home > database >  How to edit a csv file using pandas in python
How to edit a csv file using pandas in python

Time:10-31

So I have this data file I generated from a bigger one. Now I want to add a summary to the new file which includes MAX MIN MEAN all of these functions but i don't know how to write it into the file after generating it

file1 = file.sample(int(sample))
file1_max = file1.max()

file1.to_csv( Path,index=False, header=False)

CodePudding user response:

The following code shows mean, max, min and other stats:

file1.describe()
  • Related