Created
September 9, 2020 22:21
-
-
Save deanjamesss/af2e8140b7c861f0c6b5afbbfc773313 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| import pandas as pd | |
| import pandas_profiling | |
| from faker import Faker | |
| def build_fake_data(size=1): | |
| fake = Faker() | |
| output = [{'name': fake.name(), | |
| 'address': fake.address(), | |
| 'email': fake.email(), | |
| 'city': fake.city(), | |
| 'state': fake.state(), | |
| 'date_time': fake.date_time(), | |
| 'random_number': np.random.randint(1000, 2000)} for _ in range(size)] | |
| return output | |
| if __name__ == '__main__': | |
| # Override default pandas configuration | |
| pd.options.display.width = 0 | |
| pd.options.display.max_rows = 10000 | |
| pd.options.display.max_info_columns = 10000 | |
| df = pd.DataFrame(build_fake_data(10)) | |
| prof = pandas_profiling.ProfileReport(df=df) | |
| prof.to_file('pandas_profile_test.html') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment