data.rename(columns={'gdp':'log(gdp)'}, inplace=True)
The rename
show that it accepts a dict as a param for columns
so you just pass a dict with a single entry.
Also see related
More Related Contents:
- Renaming column names in Pandas
- Rename Pandas DataFrame Index
- Convert row to column header for Pandas DataFrame,
- Removing prefix from column names in Pandas
- How to add a new column to an existing DataFrame?
- Python Pandas – Find difference between two data frames
- What is the fastest way to upload a big csv file in notebook to work with python pandas?
- How to check if any value is NaN in a Pandas DataFrame
- How do I get the row count of a Pandas DataFrame?
- selecting from multi-index pandas
- Dataframe set_index not setting
- Pandas dataframe fillna() only some columns in place
- Apply CSS class to Pandas DataFrame using to_html
- Python – splitting dataframe into multiple dataframes based on column values and naming them with those values [duplicate]
- How can I replicate rows in Pandas?
- OSError: Initializing from file failed on csv in Pandas
- Convert column to row in Python Pandas
- How to create a DataFrame of random integers with Pandas?
- Putting many python pandas dataframes to one excel worksheet
- Remove Unnamed columns in pandas dataframe [duplicate]
- Find difference between two data frames
- Create new column based on values from other columns / apply a function of multiple columns, row-wise in Pandas
- Efficient way to add rows to dataframe
- Find names of top-n highest-value columns in each pandas dataframe row
- Pandas groupby and aggregation output should include all the original columns (including the ones not aggregated on)
- Rename columns in Pandas based on a dictionary
- Replace NaN with empty list in a pandas dataframe
- Get weekday/day-of-week for Datetime column of DataFrame
- Get max value from row of a dataframe in python [duplicate]
- When is it appropriate to use df.value_counts() vs df.groupby(‘…’).count()?