Skip to content

Commit

Permalink
Fix null columns issue
Browse files Browse the repository at this point in the history
  • Loading branch information
luisboitas committed Sep 16, 2022
1 parent 8a836ae commit 0398cc2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/api/resources/python-templates/init-functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def df__pattern_counts_cache(df, cols="*", n=10, mode=0, sample=None, last_sampl
sample_df = df if sample is None else df.iloc(lower_bound=sample[0], upper_bound=sample[1], copy=False)
patterns = sample_df.cols.pattern_counts(column_name, n=None, mode=mode)[column_name]["values"]

if patterns is not None:
if patterns is not None and len(patterns):
pd_patterns = table_to_pandas(patterns)

if complete:
Expand Down Expand Up @@ -245,7 +245,7 @@ def df__profile_frequency_cache(df, cols="*", n=MAX_BUCKETS, sample=None, last_s

frequency = _result["values"] if "values" in _result else None

if frequency is not None:
if frequency is not None and len(frequency):
pd_frequency = table_to_pandas(frequency)

if complete:
Expand Down

0 comments on commit 0398cc2

Please sign in to comment.