📜  python opendatasets - Python (1)

📅  最后修改于: 2023-12-03 15:04:07.014000             🧑  作者: Mango

Python opendatasets

Python opendatasets is a Python library that provides a way to easily download and work with open datasets in Python. With this library, you can quickly download and start using datasets from a variety of sources, including:

  • Kaggle
  • Google BigQuery
  • OpenML
  • UCI Machine Learning Repository
  • and more!
Installation

You can install Python opendatasets using pip:

!pip install opendatasets
Usage

To use Python opendatasets, you simply need to import it and call the download method with the URL of the dataset you want to download:

import opendatasets as od

dataset_url = 'https://www.kaggle.com/shivamb/netflix-shows'
od.download(dataset_url)

This will download the dataset to your current working directory. You can also provide a target directory where you want to download the dataset:

od.download(dataset_url, './netflix-shows')

In addition to downloading datasets, you can also use Python opendatasets to list the available datasets from different sources:

import opendatasets as od

# List the available Kaggle datasets
od.kaggle_list_datasets()

You can also search for datasets by title or tag:

import opendatasets as od

# Search for datasets with "covid" in the title
od.search_datasets('covid')
Conclusion

Python opendatasets is a powerful tool that makes it easy to work with open datasets in Python. With this library, you can quickly download datasets from a variety of sources, list available datasets, and search for datasets by title or tag. If you're a data scientist or machine learning engineer, Python opendatasets is definitely worth checking out!