a = np.array([(1, 2)], dtype=[('id', np.int64), ('value', np.int64)]) df = pd.DataFrame.from_records(a, index='id') # ok b = np.array([], dtype=[('id', np.int64), ('value', np.int64)]) df = pd.DataFrame.from_records(b, index='id') # KeyError: 'id'
The cause is _to_arrays checks for empty data before understanding that ndarray was passed.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4