You can do this efficiently with combining calendar.month_abbr
and df[col].apply()
import calendar
df['Month'] = df['Month'].apply(lambda x: calendar.month_abbr[x])
More Related Contents:
- Add missing dates to pandas dataframe
- Can pandas automatically read dates from a CSV file?
- Sort a pandas dataframe series by month name
- Convert month int to month name in Pandas
- Extracting dates that are in different formats using regex and sorting them – pandas
- How to identify and label similar rows in a pandas data frame
- Difference between map, applymap and apply methods in Pandas
- How can I use the apply() function for a single column?
- Pandas filtering for multiple substrings in series
- Python pandas insert list into a cell
- How to replace text in a string column of a Pandas dataframe?
- Pandas DataFrame Groupby two columns and get counts
- Pandas dataframe get first row of each group
- pandas .at versus .loc
- Selection with .loc in python
- Python Pandas: Group datetime column into hour and minute aggregations
- Factorize a column of strings in pandas
- ‘DataFrame’ object has no attribute ‘sort’
- How to get the last N rows of a pandas DataFrame?
- Turn Pandas Multi-Index into column
- Writing large Pandas Dataframes to CSV file in chunks
- Creating an empty Pandas DataFrame, and then filling it
- Check if rows in one dataframe exist in another dataframe
- Pretty print a pandas dataframe in VS Code
- Transpose the data in a column every nth rows in PANDAS
- Pandas custom function to find whether it is the 1st, 2nd etc Monday, Tuesday, etc – all suggestions welcome
- Convert pandas DataFrame into list of lists [duplicate]
- Got continuous is not supported error in RandomForestRegressor
- Copy text between parentheses in pandas DataFrame column into another column
- Get frequency of item occurrences in a column as percentage [duplicate]