Analyzing real-world data is somewhat difficult because we need to take various things into consideration. Apart from getting the useful data from large datasets, keeping data in required format is also very important.
One might encounter a situation where we need to capitalize any specific column in given dataframe. Let’s see how can we capitalize first letter of a column in Pandas dataframe.
Let’s create a dataframe from the dict of lists.
There are certain methods we can change/modify the case of column in pandas dataframe. Let’s see how can we capitalize first letter of columns using
Method #2: Using lambda with capitalize() method
- How to get column names in Pandas dataframe
- How to lowercase column names in Pandas dataframe
- Get n-largest values from a particular column in Pandas DataFrame
- Getting Unique values from a column in Pandas dataframe
- Apply uppercase to a column in Pandas dataframe
- Split a column in Pandas dataframe and get part of it
- Get unique values from a column in Pandas DataFrame
- Formatting integer column of Dataframe in Pandas
- Create a column using for loop in Pandas Dataframe
- Adding new column to existing DataFrame in Pandas
- Get n-smallest values from a particular column in Pandas DataFrame
- Split a text column into two columns in Pandas DataFrame
- Python | Creating a Pandas dataframe column based on a given condition
- Python | Change column names and row indexes in Pandas DataFrame
- Create a new column in Pandas DataFrame based on the existing columns
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.