请问这种使用 DataFrame 该如何实现?

请问这种使用 DataFrame 该如何实现?

|
1
two methods:
1. multi level index intuitive but not recommended https://pandas.pydata.org/docs/user_guide/advanced.html 2. duplicate values in first two columns to match third columns row count |
|
2
 不知道是不是你想要的 其实楼上也给出方案了
|
|
3
|
|
craiizDec 8, 2022
4
这个比较像透视表吧?直接 pd.pivot_table(df, index=["用户", "联系方式等信息"]) 应该就行了
|
|
5
@craiiz 感谢帮助,我去试试
|