摘要:
某列转换为字符串:df['BucketType'] = pd.Series(df['BucketType'], dtype="string")df['BucketType'] = pd.Series(df['BucketType'], dtype=pd.StringDtype())df['Bucke 阅读全文
posted @ 2021-12-15 16:46
ivyJ
阅读(16556)
评论(0)
推荐(0)
摘要:
方法1:要把'[1,2,2,3]'变为[1,2,2,3] 把str '[1,2,2,3]'左右两边的[ ]替换为空,后str.split变为数组[1,2,3,4] 方法2:把一个数组字符串转换为数组: import ast>>> s = '[54, 95, 45, -97, -51, 84, 0, 阅读全文
posted @ 2021-12-15 16:41
ivyJ
阅读(1161)
评论(0)
推荐(0)

浙公网安备 33010602011771号