Just call first element of series:
data['Native Country'].fillna(data['Native Country'].mode()[0], inplace=True)
or you can do the same with assisgnment:
data['Native Country'] = data['Native Country'].fillna(data['Native Country'].mode()[0])
More Related Contents:
- Pandas: filling missing values by mean in each group
- How to pass another entire column as argument to pandas fillna()
- Pandas fill missing values in dataframe from another dataframe
- Python Pandas replace NaN in one column with value from corresponding row of second column
- Extract the data and modify an existing excel with openpyxl
- How to drop rows of Pandas DataFrame whose value in a certain column is NaN
- How can I filter lines on load in Pandas read_csv function?
- Pandas Groupby Range of Values
- Drop rows containing empty cells from a pandas DataFrame
- Remove duplicate rows from Pandas dataframe where only some columns have the same value
- Pandas selecting by label sometimes return Series, sometimes returns DataFrame
- How to switch columns rows in a pandas dataframe
- Pandas: resample timeseries with groupby
- Pandas groupby.size vs series.value_counts vs collections.Counter with multiple series
- Pandas unstack problems: ValueError: Index contains duplicate entries, cannot reshape
- pandas – find first occurrence
- Create new dataframe in pandas with dynamic names also add new column
- How to convert a dataframe to a dictionary
- Read CSV into a dataFrame with varying row lengths using Pandas
- Filling missing values using forward and backward fill in pandas dataframe (ffill and bfill)
- Vectorizing or Speeding up Fuzzywuzzy String Matching on PANDAS Column
- Count occurrences of items in Series in each row of a DataFrame
- Efficiently select rows that match one of several values in Pandas DataFrame [duplicate]
- Can Pandas read and modify a single Excel file worksheet (tab) without modifying the rest of the file?
- plotting value_counts() in seaborn barplot
- How to resample a dataframe with different functions applied to each column?
- dask dataframe how to convert column to to_datetime
- Read a zipped file as a pandas DataFrame
- Pandas df.to_csv(“file.csv” encode=”utf-8″) still gives trash characters for minus sign
- Output data from all columns in a dataframe in pandas [duplicate]