Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

colab kaggle dataset

from google.colab import files
import os
#if you've already uploaded kaggle.json before, don't do it again
if not(os.path.exists("kaggle.json")):
  files.upload() #upload kaggle.json
!pip install --upgrade --force-reinstall --no-deps kaggle
!mkdir -p ~/.kaggle
!cp kaggle.json ~/.kaggle/
!ls ~/.kaggle
!chmod 600 /root/.kaggle/kaggle.json

#COMPETITION DATASET
dataset_name="name of competition" #you can find this on the competition data page
!kaggle competitions download -c {dataset_name}
!mkdir {dataset_name}
!unzip -q {dataset_name}.zip -d {dataset_name}
!rm -f {dataset_name}.zip

#Public Dataset
dataset_url="NAME OF DATASET"
dataset_name=dataset_url.split("/")[1]
!kaggle datasets download -d  {dataset_url}
!mkdir {dataset_name}
!unzip -q {dataset_name}.zip -d {dataset_name}
!rm -f {dataset_name}.zip
Comment

get data from kaggle to colab

import opendatasets as od
import pandas
  
od.download(
    "https://www.kaggle.com/datasets/
    muratkokludataset/acoustic-extinguisher-fire-dataset")
Comment

PREVIOUS NEXT
Code Example
Python :: print to file python 
Python :: a list of keys and a list of values to a dictionary python 
Python :: AI chatbot in Python - NAYCode.com 
Python :: cropping image google colab 
Python :: check null all column pyspark 
Python :: reply_photo bot telegram python 
Python :: count elements in list python 
Python :: add elements to list python 
Python :: python json check if key exist 
Python :: python glob.glob recursive 
Python :: Sum of Product 1 
Python :: python3 call parent constructor 
Python :: if number py 
Python :: django email 
Python :: pygame keys keep pressing 
Python :: create new dataframe from existing data frame python 
Python :: Python RegEx Searching for an occurrence of the pattern 
Python :: head first python 
Python :: abstarct class python 
Python :: convert excel to pdf python 
Python :: function with args* example 
Python :: Access the Response Methods and Attributes in python Show HTTP header 
Python :: py virtual 
Python :: get type name python 
Python :: tkinter python button 
Python :: values django 
Python :: python bild speichern 
Python :: extract address from text python 
Python :: python dict in dict 
Python :: sklean tfidf 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =