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

Function _backwards_compatible_index_name

python/pyarrow/pandas_compat.py:1055–1076  ·  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

1053
1054
1055def _backwards_compatible_index_name(raw_name, logical_name):
1056 """Compute the name of an index column that is compatible with older
1057 versions of :mod:`pyarrow`.
1058
1059 Parameters
1060 ----------
1061 raw_name : str
1062 logical_name : str
1063
1064 Returns
1065 -------
1066 result : str
1067
1068 Notes
1069 -----
1070 * Part of :func:`~pyarrow.pandas_compat.table_to_blockmanager`
1071 """
1072 # Part of table_to_blockmanager
1073 if raw_name == logical_name and _is_generated_index_name(raw_name):
1074 return None
1075 else:
1076 return logical_name
1077
1078
1079def _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