You can use the assign
function:
df = df.assign(industry='yyy')
More Related Contents:
- How to identify and label similar rows in a pandas data frame
- How to iterate over rows in a DataFrame in Pandas
- Renaming column names in Pandas
- 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
- Filtering Pandas DataFrames on dates
- 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
- How can I map True/False to 1/0 in a Pandas DataFrame?
- Selection with .loc in python
- Pandas select rows and columns based on boolean condition
- How to flatten a hierarchical index in columns
- Add column to dataframe with constant value
- How can I subclass a Pandas DataFrame?
- Python / Pandas – GUI for viewing a DataFrame or Matrix [closed]
- How to do “(df1 & not df2)” dataframe merge in pandas?
- Add a sequential counter column on groups to a pandas dataframe
- How do I assign values based on multiple conditions for existing columns?
- Pandas: Shift down values by one row within a group
- Python Pandas replace NaN in one column with value from corresponding row of second column
- Xticks by pandas plot, rename with the string
- Calculate summary statistics of columns in dataframe
- Check if certain value is contained in a dataframe column in pandas [duplicate]
- Pandas: Join dataframe with condition
- UnicodeDecodeError when reading CSV file in Pandas
- how to understand closed and label arguments in pandas resample method?