i have my dataframe in pandas something like this :
this is df_proto
proto time
8 838,1691461,1690623 May 23 2018 06:31:52 GMT
28 838,1691470,1690632 May 23 2018 06:32:02 GMT
49 838,1691471,1690633 May 23 2018 06:32:12 GMT
70 838,1691474,1690636 May 23 2018 06:32:22 GMT
i want values of proto to split into columns and each value get converted to an int or float.
the code that i tried is this:
df_proto=df3.loc[df3.proto.notnull(),['proto','time']].copy()
df_proto.proto.str.split(',').str[2].astype(int) # here i have to specify which part of proto to convert into int. and also i am not able to add this in the df_proto. and i dont know how many values proto will contain but it is sure that all proto will have same number of value.
please help me with this.