main.py63 chars4 lines
In this snippet, we import the pandas
library as pd
. Then we use the read_csv()
method to read the csv file named 'file.csv' into a pandas DataFrame. We use the index_col
parameter to specify that we want the first column of the CSV to be used as the index of the DataFrame. The resulting DataFrame is stored in the variable df
.
gistlibby LogSnag