Skip to content

Commit b05cbe6

Browse files
author
y-p
committed
CLN: remove config._get_option_fast. get_option faster now GH5147
1 parent 7379833 commit b05cbe6

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

pandas/core/config.py

-9
Original file line numberDiff line numberDiff line change
@@ -532,15 +532,6 @@ def _get_root(key):
532532
return cursor, path[-1]
533533

534534

535-
def _get_option_fast(key):
536-
""" internal quick access routine, no error checking """
537-
path = key.split('.')
538-
cursor = _global_config
539-
for p in path:
540-
cursor = cursor[p]
541-
return cursor
542-
543-
544535
def _is_deprecated(key):
545536
""" Returns True if the given option has been deprecated """
546537

pandas/core/generic.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1018,7 +1018,7 @@ def _setitem_copy(self, copy):
10181018
def _check_setitem_copy(self):
10191019
""" validate if we are doing a settitem on a chained copy """
10201020
if self._is_copy:
1021-
value = config._get_option_fast('mode.chained_assignment')
1021+
value = config.get_option('mode.chained_assignment')
10221022

10231023
t = ("A value is trying to be set on a copy of a slice from a "
10241024
"DataFrame.\nTry using .loc[row_index,col_indexer] = value "

0 commit comments

Comments
 (0)