Skip to main content

Provides instant access to many popular datasets right from Pyspark (in dataframe structure).

Project description

SparkDataset

Provides instant access to many datasets right from Pyspark (in Spark DataFrame structure).

What?

The idea is simple. There are various datasets available out there, but they are scattered in different places over the web. Is there a quick way (in Pyspark) to access them instantly without going through the hassle of searching, downloading, and reading ... etc? SparkDataset tries to address that question :)

Usage:

Start with importing data():

from sparkdataset import data
  • To load a dataset:
titanic = data('titanic')
  • To display the documentation of a dataset:
data('titanic', show_doc=True)
  • To see the available datasets:
data()

That's it.

Why?

In R, there is a very easy and immediate way to access multiple statistical datasets, in almost no effort. All it takes is one line > data(dataset_name). This makes the life easier for quick prototyping and testing. Well, I am jealous that Pyspark does not have a similar functionality. Thus, the aim of sparkdataset is to fill that gap.

Currently, sparkdataset has about 757 (mostly numerical-based) datasets, that are based on RDatasets. In the future, I plan to scale it to include a larger set of datasets. For example,

  1. include textual data for NLP-related tasks, and
  2. allow adding a new dataset to the in-module repository.

Installation:

$ pip install sparkdataset

Uninstall:

  • $ pip uninstall sparkdataset
  • $ rm -rf $HOME/.sparkdataset

Changelog

1.0.0

  • Added search dataset by name similarity.
  • Example:
>>> data('heat')
Did you mean:
Wheat, heart, Heating, Yeast, eidat, badhealth, deaths, agefat, hla, heptathlon, azt
  • Added support to Windows.

Dependency:

  • pandas
  • pyspark :: 3.1.2

Miscellaneous:

  • Tested on OSX and Linux (debian).
  • Supports both Python 3 (3.8.8 and above).

TODO:

  • add textual datasets (e.g. NLTK stuff).
  • add samples generators.

Thanks to:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sparkdataset-1.0.0.tar.gz (15.9 MB view details)

Uploaded Source

Built Distribution

sparkdataset-1.0.0-py3-none-any.whl (15.9 MB view details)

Uploaded Python 3

File details

Details for the file sparkdataset-1.0.0.tar.gz.

File metadata

  • Download URL: sparkdataset-1.0.0.tar.gz
  • Upload date:
  • Size: 15.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for sparkdataset-1.0.0.tar.gz
Algorithm Hash digest
SHA256 fd0d996abc2c9051b97354036b4cbf3b006e7febbcdaf8638a9140d2ce7221d8
MD5 5775c9459abf1e09771a249ba1a80c00
BLAKE2b-256 6a1e8abca2627b3bb785f2a60a092bc6eeb1b334d70577c5f9dbc67f82a08224

See more details on using hashes here.

File details

Details for the file sparkdataset-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: sparkdataset-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 15.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for sparkdataset-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8de8d425a414992fb016ec089a62a76c38e9aa20a88aad61859547a9e0c35b1b
MD5 1795bff1cc72307a04465ca88f28d645
BLAKE2b-256 59600d56e3f4135bc0c7697dd8cb902c9166c5f0154fe2feaaa6013f7fba526f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page