我有以下数据框,其中城市是列,年龄是值:
我想创建一个新的数据框,其中列是年龄组,城市是索引,如下所示:
这可以在熊猫中做到吗?
python dataframe pandas
dataframe ×1
pandas ×1
python ×1