We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f7456e2 commit ac0ba68Copy full SHA for ac0ba68
pandas/core/frame.py
@@ -8446,9 +8446,8 @@ def isin(self, values) -> "DataFrame":
8446
8447
def _from_nested_dict(data):
8448
# TODO: this should be seriously cythonized
8449
- new_data = {}
+ new_data = collections.defaultdict(dict)
8450
for index, s in data.items():
8451
for col, v in s.items():
8452
- new_data[col] = new_data.get(col, {})
8453
new_data[col][index] = v
8454
return new_data
0 commit comments