-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* migrate from pandas to polars * set dtypes, csv to parquet * set dtypes and convert csv to parquet * rm garbage files * support for date, fixed incorrect selected_columns * dq rules fix for polars * dq rules * data manipulation * manipulation fixes * dtype suggestion on change * ML Polars fixes
- Loading branch information
Showing
18 changed files
with
22,509 additions
and
300 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,6 @@ env | |
__pycache__ | ||
mydatabase.db | ||
.streamlit/secrets.toml | ||
.venv | ||
*.parquet | ||
*.csv | ||
.venv |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import pandas as pd | ||
import numpy as np | ||
import random | ||
from datetime import datetime, timedelta | ||
|
||
# Number of rows to generate | ||
num_rows = 100 | ||
|
||
# Generate sample data | ||
data = { | ||
"StringColumn": [f"String_{i}" for i in range(num_rows)], | ||
"Float64Column": np.random.uniform(0.0, 100.0, size=num_rows).tolist(), | ||
"CategoryColumn": [f"Category_{random.choice(['A', 'B', 'C'])}" for _ in range(num_rows)], | ||
"DateColumn": [(datetime.now() - timedelta(days=random.randint(0, 365))).strftime('%Y-%m-%d') for _ in range(num_rows)], | ||
"BooleanColumn": [random.choice([True, False]) for _ in range(num_rows)], | ||
"AdditionalColumn1": [random.randint(1, 100) for _ in range(num_rows)], | ||
"AdditionalColumn2": [f"Extra_{i}" for i in range(num_rows)], | ||
"AdditionalColumn3": np.random.normal(50.0, 10.0, size=num_rows).tolist(), | ||
"AdditionalColumn4": [datetime.now().strftime('%H:%M:%S') for _ in range(num_rows)], | ||
"AdditionalColumn5": [random.choice(['X', 'Y', 'Z']) for _ in range(num_rows)], | ||
} | ||
|
||
# Create DataFrame | ||
df = pd.DataFrame(data) | ||
|
||
# Save to CSV | ||
csv_file_path = "sample_data.csv" | ||
df.to_csv(csv_file_path, index=False) | ||
|
||
print(f"CSV file created at {csv_file_path}") |
This file contains 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
Oops, something went wrong.