Files
data_pipeline_for_YNAB/test.py
T
2024-08-09 15:14:04 +01:00

29 lines
1.0 KiB
Python

import polars as pl
entities = ['accounts']#, 'categories', 'months', 'payees', 'transactions', 'scheduled_transactions']
for entity in entities:
# print(f"Processing entity: {entity}")
file_path = f'data/base/{entity}.parquet'
# Read the parquet file into a polars DataFrame
entity_df = pl.read_parquet(file_path)
# Print the schema of the DataFrame
print(f"Schema of {entity} DataFrame:")
print(entity_df.schema)
# Display the first few rows of the DataFrame
print(f"First few rows of {entity} DataFrame:")
print(entity_df.head())
for entity in entities:
# print(f"Processing entity: {entity}")
file_path = f'data/warehouse/{entity}.parquet'
# Read the parquet file into a polars DataFrame
entity_df = pl.read_parquet(file_path)
# Print the schema of the DataFrame
print(f"Schema of {entity} DataFrame:")
print(entity_df.schema)
# Display the first few rows of the DataFrame
print(f"First few rows of {entity} DataFrame:")
with pl.
print(entity_df)