Convert whole dataframe from lower case to upper case with Pandas
问题 I have a dataframe like the one displayed below: # Create an example dataframe about a fictional army raw_data = {'regiment': ['Nighthawks', 'Nighthawks', 'Nighthawks', 'Nighthawks'], 'company': ['1st', '1st', '2nd', '2nd'], 'deaths': ['kkk', 52, '25', 616], 'battles': [5, '42', 2, 2], 'size': ['l', 'll', 'l', 'm']} df = pd.DataFrame(raw_data, columns = ['regiment', 'company', 'deaths', 'battles', 'size']) My goal is to transform every single string inside of the dataframe to upper case so