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)
| 1068 | |
| 1069 | |
| 1070 | def _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 | |
| 1094 | def _is_generated_index_name(name): |
no test coverage detected