python - How do you separate a column with words not separated at all. The data loaded from pd.read_table?
问题描述
So I uploaded a data from pd.read_table:
df = pd.read_table('Test_Data.txt', delim_whitespace=True, names=('A', 'B'))
and the data is:
A B
0 AAABBABAABBAAABBBBAABBBABAAABAAAAABBBABBBAAABB... True
1 AABAABABBBABAAAAABAAABBAABAABBABABBAAABABBBBAB... True
2 BAAABBBBABABABBBABBAAABAAAAAAABBBBAABABABBBAAB... True
3 BAABBABBABBAAAABABBBAAAAAAAABAAABBAAAABBAABBAA... True
4 ABBABBBABBAABAABABBAAABAAAAABABABAABBAABBBAABA... True
Column A is 100 alphabets. I want to split each in separate columns. I want to have 100 columns of these alphabets and column B as it is. How must I do that?
Thank you!
解决方案
推荐阅读
- c++ - 在 C++ 中实例化类的最首选方法是什么?
- graphql - Gatsby 图像 - 在 Markdown html 中缩放和延迟加载图像
- jasper-reports - Jasper 报告:框架内的文本字段拉伸
- django - Django:正在创建静态文件,但 django 找不到静态文件并查看静态文件夹
- javascript - 在子菜单中添加输入搜索后如何标记 jQuery 移动选择菜单
- python - 在 Pandas DataFrame 上调用 sort_values() 会引发 ValueError:Series 的真值不明确
- r - 根据 which.max() 创建一个数据框
- javascript - javascript更改未显示在浏览器上
- rust - 有没有办法让 serde_json 严格反序列化?
- angular - 如何检查传单地图是否有多边形?