> Every page of the ganymede website is listed in https://eugo.io/docs/ganymede/llms.txt.

# Faker PySpark

> Faker PySpark: Work with fake pyspark data. A Python demo notebook from ganymede.

Web page: https://eugo.io/docs/ganymede/demo_notebooks/testing/faker/faker_pyspark/
Notebook: https://eugo.io/docs/ganymede/demo_notebooks/testing/faker/faker_pyspark/faker_pyspark.ipynb (source: https://github.com/eugo-inc/ganymede/blob/main/demo_notebooks/testing/faker/faker_pyspark.ipynb)

Description:
- Work with fake pyspark data

Resources:
- https://github.com/spsoni/faker-pyspark

NOTE:
- faker-pyspark needs `pyspark` installed (see https://github.com/spsoni/faker-pyspark/blob/main/faker_pyspark/pyspark.py).

## Example 1:

Generate fake pyspark dataframe

```python
from faker_pyspark import PySparkProvider
from faker import Faker

faker = Faker()
faker.add_provider(PySparkProvider)

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

print(df)
```
