Problem in PerformanceWarning

I have tried to get DEG in my different groups of cell clusters but there comes with ana warning:

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()`

It seemed that the problem occurs due to code in scanpy/tools/_rank_genes_groups.py line 394 396 399 409 420. Is there any idea on why it occurs and how to improve dealing with fragmented dataframe?

any updates on this? I’ve also bumped into the same issue while running rank_genes_groups on a relatively large dataset (~200k cells) and it crashes the operation. Scanpy 1.9.3 anndata 0.9.1