How to read files in Python?
How to read a file from kaggle?
First of all, find the data set you want.
And then once you click on this data set,
there is an option to download it on your machine.
Click download. Once you’re in your Jupiter notebooks,
VS code or other I d you using to work with your files,
import pandas library. So to do that,
you say import pandas s P d.
Then we will create a new variable called data equals pandas or p
d dot read underscore c s v brackets.
And in the brackets
you indicate the path to the data set you just downloaded from kaggle.
By default, all my files go to downloads.
It comes in a zip format.
You need to unzip obviously your file and then you can read it.
In case your file is not in CSV but Excel format,
you say data equals pandas dot read and then Excel brackets.
And then the same in brackets in quotes,
you indicate the path to your file.