Skip to content

Commit

Permalink
Updates for pandas warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
dougiesquire committed Nov 2, 2023
1 parent 2ddddad commit 24ac3c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/intake_dataframe_catalog/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def add(
)
metadata[self.yaml_column] = source.yaml()

row = pd.DataFrame({k: 0 for k in metadata.keys()}, index=[0])
row = pd.DataFrame({k: "" for k in metadata.keys()}, index=[0])
row.iloc[0] = pd.Series(metadata)

if self._df.empty:
Expand Down Expand Up @@ -614,6 +614,6 @@ def _columns_with_iterables(df, sample=False):

_df = df.sample(20, replace=True) if sample else df

has_iterables = _df.applymap(type).isin([list, tuple, set]).any().to_dict()
has_iterables = _df.map(type).isin([list, tuple, set]).any().to_dict()

return [col for col, check in has_iterables.items() if check]

0 comments on commit 24ac3c4

Please sign in to comment.