import re
text='3,5.6:6'
print(re.split('[.,:]',text))
['3', '5', '6', '6']
pandas.Series.str.split(pat=None, n=-1, expand=False)
#x[0:2]前二位
df['列名']=df['列名'].apply(lambda x:x[0:2]).tolist()
Login_nei['shengfen'] = Login_nei['login_place'].apply(lambda x:x[2:5]).tolist()
Login_nei['chengshi'] = Login_nei['login_place'].apply(lambda x:x[5:]).tolist()
Login_nei.head()
#将日期与时间分割
Login1 = Login["login_time"].str.split(" ",expand=True).fillna("")
Login1['login_data'] = Login1[0]
Login1['login_hour'] = Login1[1]
Login1['user_id'] = Login['user_id']
Login2 = Login1[['user_id','login_data','login_hour']]
Login2.head()