Last active
May 8, 2025 11:16
-
-
Save benmaier/b348a9d41ee24c44f763e0f689e24450 to your computer and use it in GitHub Desktop.
Terminal command to inspect a parquet schema overview (with python-polars)
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
parq () { | |
python -c "import polars as po; schema = po.read_parquet_schema('$1'); n = max(map(len,schema.keys())); [ print(f'{k.ljust(n,\" \")}: {v}') for k, v in schema.items() ]" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
usage:
out:
short_column_name : String long_very_very_long_column_name: Int64