import pandas as pd df = pd.DataFrame({'A-1':[1,2,3,4,5],'A-2':[1,2,3,4,5]}) print(df.columns) --------------------------------------------------------- Index(['A-1', 'A-2'], dtype='object') # columns.str.replace(변경전 문자,변경할 문자) df.columns = df.columns.str.replace('-','_') print(df.columns) --------------------------------------------------------- Index(['A_1', 'A_2'], dtype='object') # - A-1이 A_..