MCPcopy Create free account
hub / github.com/apache/arrow / _backwards_compatible_index_name

Function _backwards_compatible_index_name

python/pyarrow/pandas_compat.py:1070–1091  ·  view source on GitHub ↗

Compute the name of an index column that is compatible with older versions of :mod:`pyarrow`. Parameters ---------- raw_name : str logical_name : str Returns ------- result : str Notes ----- * Part of :func:`~pyarrow.pandas_compat.table_to_blockmanager`

(raw_name, logical_name)

Source from the content-addressed store, hash-verified

1068
1069
1070def _backwards_compatible_index_name(raw_name, logical_name):
1071 """Compute the name of an index column that is compatible with older
1072 versions of :mod:`pyarrow`.
1073
1074 Parameters
1075 ----------
1076 raw_name : str
1077 logical_name : str
1078
1079 Returns
1080 -------
1081 result : str
1082
1083 Notes
1084 -----
1085 * Part of :func:`~pyarrow.pandas_compat.table_to_blockmanager`
1086 """
1087 # Part of table_to_blockmanager
1088 if raw_name == logical_name and _is_generated_index_name(raw_name):
1089 return None
1090 else:
1091 return logical_name
1092
1093
1094def _is_generated_index_name(name):

Callers 1

_extract_index_levelFunction · 0.85

Calls 1

_is_generated_index_nameFunction · 0.85

Tested by

no test coverage detected