File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -444,12 +444,10 @@ def add_suffix_to_path(
444444 Returns:
445445 (pd.DataFrame)
446446 """
447- data_replace = _data [_condition ]
448- data_replace [path_col ] = data_replace [path_col ].str .replace (
449- _original_name , f"{ _original_name } ({ suffix } )" , regex = True
450- )
451- data_not_replace = _data [~ _condition ]
452- return data_replace ._append (data_not_replace ).sort_index ()
447+ _data .iloc [_condition .values , _data .columns .get_loc (path_col )] = _data .iloc [
448+ _condition .values , _data .columns .get_loc (path_col )
449+ ].str .replace (_original_name , f"{ _original_name } ({ suffix } )" , regex = True )
450+ return _data
453451
454452 for node_removed , move_indicator in zip (nodes_removed , moved_from_indicator ):
455453 if not detail :
You can’t perform that action at this time.
0 commit comments