How can I make a shallow or deep copy of StyleFrame object? When I use copy.copy(sf) or , copy.deepcopy(sf) I get error: "RecursionError: maximum recursion depth exceeded while calling a Python object"
import copy
from StyleFrame import StyleFrame
import pandas as pd
df=pd.DataFrame([list('abc')])
sf=StyleFrame(df)
copy.copy(sf)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\python\python373\lib\copy.py", line 106, in copy
return _reconstruct(x, None, *rv)
File "C:\python\python373\lib\copy.py", line 281, in _reconstruct
if hasattr(y, '__setstate__'):
File "C:\python\python373_vm1\lib\site-packages\StyleFrame\style_frame.py", line 121, in __getattr__
if attr in self.data_df.columns:
File "C:\python\python373_vm1\lib\site-packages\StyleFrame\style_frame.py", line 121, in __getattr__
if attr in self.data_df.columns:
File "C:\python\python373_vm1\lib\site-packages\StyleFrame\style_frame.py", line 121, in __getattr__
if attr in self.data_df.columns:
[Previous line repeated 495 more times]
RecursionError: maximum recursion depth exceeded while calling a Python object