From ffade85bc6207e55a69136a120f8a1f1420cbfef Mon Sep 17 00:00:00 2001 From: Tom Date: Mon, 26 Aug 2024 22:37:31 +0100 Subject: [PATCH] docs: add docstring for snake case --- harley/transformations.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/harley/transformations.py b/harley/transformations.py index 421c1bf..0070139 100644 --- a/harley/transformations.py +++ b/harley/transformations.py @@ -7,6 +7,15 @@ def snake_case_column_names(df: PolarsFrame) -> PolarsFrame: + """ + Takes a PolarsFrame, converts its column names to snake case, + and returns the modified PolarsFrame. + + :param df: A PolarsFrame object, which can be eith er a LazyFrame or DataFrame. + :type df: PolarsFrame + :return: The function `snake_case_column_names` is returning a PolarsFrame with column names + converted to snake case. + """ if isinstance(df, LazyFrame): all_column_names = df.collect_schema().names() else: