Skip to content

Commit

Permalink
fix(pandas): add condition for pandas config (#415)
Browse files Browse the repository at this point in the history
  • Loading branch information
d33bs authored May 14, 2024
1 parent 00d8f0b commit f3ce792
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pycytominer/__config__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@

# configure pandas copy_on_write for 3.0.0 requirements
# see: https://pandas.pydata.org/pandas-docs/version/2.2.0/whatsnew/v2.2.0.html#copy-on-write
pd.options.mode.copy_on_write = True
# note: we use a conditional here to avoid exceptions
# with versions of pandas which don't include this option.
if "copy_on_write" in dir(pd.options.mode):
pd.options.mode.copy_on_write = True

0 comments on commit f3ce792

Please sign in to comment.