Skip to content
Snippets Groups Projects
Commit de4e8803 authored by Sortofamudkip's avatar Sortofamudkip
Browse files

colname in columns check (get_category_counts)

parent 8ec76555
No related branches found
No related tags found
No related merge requests found
......@@ -270,6 +270,10 @@ class Dataset:
if type(colname) != str:
logging.error("parameter `colname` is not a string")
raise ValueError(f"{colname} is not a string")
if colname not in self.dataframe.columns:
logging.error("column requested not in dataframe")
raise KeyError(f"{colname} is not a column in dataframe")
if not (ascending is None or type(ascending) is bool):
logging.error("parameter `ascending` is not a bool or None")
raise ValueError(f"{ascending} is not a bool or None")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment