270270
271271 from pandas .io .formats .style import Styler
272272
273- from pandas .core .frame_versioning import DataFrameSnapshotStore
273+ from pandas .core .frame_versioning import DataFrameSnapshotStore
274274
275275# ---------------------------------------------------------------------
276276# Docstring templates
@@ -14393,13 +14393,10 @@ def restore(self, name: str, inplace: bool = False):
1439314393 """
1439414394 store = getattr (self , "_version_snapshots" , None )
1439514395 if store is None :
14396- raise KeyError (f"No snapshots present for this DataFrame (requested: { name } )" )
14396+ raise KeyError (f"No snapshots present for this DataFrame(requested:{ name } )" )
1439714397 restored = store .restore (name )
1439814398 if inplace :
14399- # Replace internal state. Using _mgr replacement is more correct than __dict__ update.
14400- # Many pandas internals use the attribute _mgr for BlockManager. Use it cautiously.
1440114399 try :
14402- # pandas >= 1.x use _mgr (BlockManager); adapt if different in your branch.
1440314400 object .__setattr__ (self , "_mgr" , restored ._mgr )
1440414401 # also copy other key attrs
1440514402 object .__setattr__ (self , "axes" , restored .axes )
@@ -14423,7 +14420,7 @@ def drop_snapshot(self, name: str) -> None:
1442314420 """
1442414421 store = getattr (self , "_version_snapshots" , None )
1442514422 if store is None :
14426- raise KeyError (f"No snapshots present for this DataFrame (requested drop: { name } )" )
14423+ raise KeyError (f"No snapshots present for this DataFrame(requested drop:{ name } )" )
1442714424 store .drop (name )
1442814425
1442914426 def clear_snapshots (self ) -> None :
0 commit comments