module 'pandas.util' has no attribute 'testing'

来源:4-9 时间序列数据的采样和画图

慕设计1336241

2024-07-24

df[‘student’] = [pd.util.testing.rands(3) for i in range(20)]
运行上述代码是抛出标题异常,可能是pandas版本已更新源码的原因,那么要如何随机生成字符串

写回答

1回答

麦兜搞IT

2025-04-24

试试把  pandas.util.testing 替换成 pandas.testing.

0
0

Python数据分析入门与实践,开启Data Science职业之旅

只要会python,就能轻松入门数据分析!

2217 学习 · 338 问题

查看课程