Reputation: 63
I am trying to convert a string column in a data frame from lowercase letter to capital letter. I only want that specific column to be modified, not the dataframe as its whole.
worker name hours/task Country
constructor Marco 7 United States
operator Samuel 6 United States
designer Ivgnar 5 Sweden
designer Michael 6 Britain
the column with name 'worker'. I want its words to be turned into capital letters.
Thanks,
Upvotes: 0
Views: 653
Reputation: 38415
Pandas str.upper would work as well.
df['worker'] = df['worker'].str.upper()
Upvotes: 1