import pandas as pd
df = pd.read_csv('data/museum_2.csv')
# 여기에 코드를 작성하세요
phone_number = df['운영기관전화번호'].str.split(pat='-', n=2, expand=True)
df['지역번호'] = phone_number[0]
df
'자동제어 > Python for robotics' 카테고리의 다른 글
groupby(), .sort_values(by=), (0) | 2023.03.24 |
---|---|
.map(), .rename(column={}, inplace = True) (0) | 2023.03.21 |
문자열 필터링(.str.contains()) (0) | 2023.03.19 |
타이타닉 EDA(hist, scatter, .value_counts(), kdeplot(), stripplot(data = , x= , y= , hue= ), violinplot()) (0) | 2023.03.19 |
영화 카페(corr(), clustermap) (0) | 2023.03.19 |