Skip to content

Commit

Permalink
refactor: update docstrings and remove redundant comments
Browse files Browse the repository at this point in the history
In this commit, we have updated the docstring for the `_get_data_df` method
in the `DataDescription` class to provide more detailed information about its functionality.
We have also removed the redundant comments from the `__init__` method of the `col` class in `utils.py`
as they were not providing any additional value.
  • Loading branch information
ericmjl committed Oct 8, 2023
1 parent 246badf commit 9f557d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
5 changes: 4 additions & 1 deletion janitor/accessors/data_description.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ class DataDescription:
"""

def __init__(self, data):
"""Initialize DataDescription class."""
self._data = data
self._desc = {}

def _get_data_df(self) -> pd.DataFrame:
"""Get a table of descriptive information in a DataFrame format.
:returns: A DataFrame containing the descriptive information.
"""
df = self._data

data_dict = {}
Expand Down
8 changes: 0 additions & 8 deletions janitor/functions/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1057,14 +1057,6 @@ class col:
"""

def __init__(self, column: Hashable):
"""Initialize a new instance of the `col` class.
Args:
column (Hashable): The name of the column to be selected.
Raises:
TypeError: If the `column` parameter is not hashable.
"""
self.cols = column
check("column", self.cols, [Hashable])
self.join_args = None
Expand Down

0 comments on commit 9f557d4

Please sign in to comment.