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
# /// script | |
# dependencies = [ | |
# "fire", | |
# "polars", | |
# "rich", | |
# "redshift_connector", | |
# ] | |
# /// | |
import json |
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 polars as pl | |
def drop_columns_that_are_all_null(_df: pl.DataFrame) -> pl.DataFrame: | |
return _df[[s.name for s in _df if not (s.null_count() == _df.height)]] | |