first rows of data frame (specify n by param) 1

first rows of data frame (specify n by param)

print(df["data"].head()) 

Here is what the above code is Doing:
1. We’re using the read_csv() function to read the csv file into a pandas dataframe.
2. We’re using the head() function to print the first 5 rows of the dataframe.

Similar Posts