Loading collections of datasets - Python code examples
How to fetch Kaggle data from python code?

Install kaggle package
C:\Users\TalgatHafiz&gt;  pip install kaggle

login to your Kaggle account
click on the icon in the upper right corner -&gt; My Account
Scroll down to API section
Click &quot;Create New API Token&quot;
&quot;kaggle.json&quot; file is created and saved locally

Create &quot;.kaggle&quot; dir
C:\Users\TalgatHafiz&gt;mkdir .kaggle
and move &quot;kaggle.json&quot; into that directory

see all active competitions by running the following command
C:\Users\TalgatHafiz&gt;kaggle competitions list

Select one of the competitions that you signed up for, eg
https://www.kaggle.com/c/contradictory-my-dear-watson/data#
Scroll down. Right before &quot;Data Explorer&quot; section there should be API line:
&quot;kaggle competitions download -c contradictory-my-dear-watson&quot;
copy it

run these commands from the notebook
import kaggle
!kaggle competitions download -c contradictory-my-dear-watson

zipped data file is downloaded into your the same directory where your notebook is:
C:\Users\TalgatHafiz\conda\contradictory-my-dear-watson.zip
so now you can unzip and start using the data


If you still have questions please read
https://medium.com/@jeff.daniel77/accessing-the-kaggle-com-api-with-jupyter-notebook-on-windows-d6f330bc6953