Skip to main content

faker-pyspark is a PySpark DataFrame and Schema provider for the Faker python package

Project description

PySpark provider for Faker

Python package CodeQL

faker-pyspark is a PySpark DataFrame and Schema (StructType) provider for the Faker Python package.

Description

faker-pyspark provides PySpark based fake data for testing purposes. The definition of "fake" in this context really means "random," as the data may look real. However, I make no claims about accuracy, so do not use this as real data!

Installation

Install with pip:

pip install faker-pyspark

Add as a provider to your Faker instance:

from faker import Faker
from faker_pyspark import PySparkProvider
fake = Faker()
fake.add_provider(PySparkProvider)

PySpark DataFrame, Schema and more

>>> df           = fake.pyspark_dataframe()
>>> schema       = fake.pyspark_schema()
>>> df_updated   = fake.pyspark_update_dataframe(df)
>>> column_names = fake.pyspark_column_names()
>>> data         = fake.pyspark_data_dict_using_schema(schema)
>>> data         = fake.pyspark_data_dict()

CLI faker

$ faker pyspark_schema       -i faker_pyspark
$ faker pyspark_dataframe    -i faker_pyspark
$ faker pyspark_schema       -i faker_pyspark
$ faker pyspark_column_names -i faker_pyspark
$ faker pyspark_data_dict    -i faker_pyspark

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

faker_pyspark-0.8.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

faker_pyspark-0.8.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file faker_pyspark-0.8.0.tar.gz.

File metadata

  • Download URL: faker_pyspark-0.8.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Darwin/22.5.0

File hashes

Hashes for faker_pyspark-0.8.0.tar.gz
Algorithm Hash digest
SHA256 f47a57a9ece5706a1feb3983a6eec5212ee9ca1f46d41728c38bad07b1078f46
MD5 d6df4c82ebd6483e6199abdf56e9f6d9
BLAKE2b-256 adf60e9bc3b39117a6df5db077a97535ea0a1114090a2d6b2cc4b77f809eb70b

See more details on using hashes here.

File details

Details for the file faker_pyspark-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: faker_pyspark-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Darwin/22.5.0

File hashes

Hashes for faker_pyspark-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d324135e4148cba30f4bca0518e996da8a9893eb49e45b6c343b82a12f0e3d5f
MD5 5f924eead40cc6f1b9d6f16eea8efb4e
BLAKE2b-256 f2f2e27f4b5fddc60f47e64193661672bfde206be92d010b5050a33b3154df0b

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