Skip to content

Commit

Permalink
docs: add docstring for snake case
Browse files Browse the repository at this point in the history
  • Loading branch information
TomBurdge committed Aug 26, 2024
1 parent 47cbd4c commit ffade85
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions harley/transformations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit ffade85

Please sign in to comment.