Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.

Pandas PerformanceWarning #797

Open
neubig opened this issue May 25, 2023 · 0 comments
Open

Pandas PerformanceWarning #797

neubig opened this issue May 25, 2023 · 0 comments

Comments

@neubig
Copy link
Contributor

neubig commented May 25, 2023

When running Zeno the Zeno visualization functions (in the context of Zeno Build), I'm getting the following warnings:

zeno/util.py:86: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`
  df.loc[:, str(col_name)] = pd.Series([pd.NA] * df.shape[0], index=df.index)

And indeed, some operations seem slower than I expect. It might be nice to debug this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant