熊猫将行转换为列

时间:2019-07-25 19:07:07

标签: python pandas

如何在熊猫中转换以下内容:

enter image description here

收件人

enter image description here

这是我的答案:我拥有的数据是嵌套的json:

我拥有的json由包含Json的行组成,当标准化时,该行包含另一个json。下面,我将整个json标准化为一个数据框。

Collecting imblearn
  Using cached https://files.pythonhosted.org/packages/81/a7/4179e6ebfd654bd0eac0b9c06125b8b4c96a9d0a8ff9e9507eb2a26d2d7e/imblearn-0.0-py2.py3-none-any.whl
Collecting imbalanced-learn (from imblearn)
  Using cached https://files.pythonhosted.org/packages/e0/87/39a4cecebc7fb9ddb433fe8bc7f76379b4918a0ade91f8a1423dc25c7ddc/imbalanced-learn-0.5.0.tar.gz
Requirement already satisfied: numpy>=1.11 in 
Requirement already satisfied: scipy>=0.17 in 
Collecting scikit-learn>=0.21 (from imbalanced-learn->imblearn)
  ERROR: Could not find a version that satisfies the requirement scikit-learn>=0.21 (from imbalanced-learn->imblearn) (from versions: 0.9, 0.10, 0.11, 0.12, 0.12.1, 0.13, 0.13.1, 0.14, 0.14.1, 0.15.0b1, 0.15.0b2, 0.15.0, 0.15.1, 0.15.2, 0.16b1, 0.16.0, 0.16.1, 0.17b1, 0.17, 0.17.1, 0.18rc2, 0.18, 0.18.1, 0.18.2, 0.19b2, 0.19.0, 0.19.1, 0.19.2, 0.20rc1, 0.20.0, 0.20.1, 0.20.2, 0.20.3, 0.21rc2)
ERROR: No matching distribution found for scikit-learn>=0.21 (from imbalanced-learn->imblearn)

0 个答案:

没有答案