📜  多个分隔符 pandas - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:13.103000             🧑  作者: Mango

代码示例1
>>> !cat castle.dat
c stuff
c more header
c begin data         
 1 1:.5
 1 2:6.5
 1 3:5.3
>>> df = pd.read_csv('castle.dat', skiprows=3, names=['a', 'b', 'c'], 
                     sep=' |:', engine='python')
>>> df
   a  b    c
0  1  1  0.5
1  1  2  6.5
2  1  3  5.3