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)
| 1053 | |
| 1054 | |
| 1055 | def _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 | |
| 1079 | def _is_generated_index_name(name): |
no test coverage detected