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 pandas as pd | |
| import pyarrow as pa | |
| import pyarrow.parquet as pq | |
| min_row_count = 512 | |
| max_row_count = 2048 | |
| def write_parquet_content_defined(df: pd.DataFrame, key_column: str, output_file: str): | |
| # Initialize the Parquet writer object | |
| writer = None | |
| batch_accumulator = [] |