You can use DataFrame.fillna or Series.fillna which will replace the Python object None, not the string 'None'.

import pandas as pd
import numpy as np

For dataframe:

df = df.fillna(value=np.nan)

For column or series:

df.mycol.fillna(value=np.nan, inplace=True)
Answer from Guillaume Jacquenot on Stack Overflow
🌐
Reddit
reddit.com › r/learnpython › issue replacing 'none' with df.fillna()
r/learnpython on Reddit: Issue replacing 'None' with df.fillna()
July 10, 2022 -

Hey All,

I am using the below code to export Jira issues. Not all of my issues have all the custom fields I am trying to export so they end up being 'None'. I would like to replace the 'None' with an empty string. I am trying to use pandas df.fillna but it's not doing what I thought it would. In spite of using fillna, my output is unchanged and still contains 'None' values.

What am I doing wrong?

Thanks!

Code:

# Search all issues, and time execution
jira_issues = jira.search_issues(jql,maxResults=50)

# Converge JSON to Pandas DataFrame
for issue in jira_issues:
    try:
        issue_fields = pd.DataFrame({
            'id':                       [issue.id],
            'Due date':                 str(issue.fields.duedate),
            'Actual Start Date':          str(issue.fields.customfield_10055),
            'Actual Completion Date':     str(issue.fields.customfield_10057)
        })
    except AttributeError:
        pass
    issues = pd.concat([issues,issue_fields])

issues.fillna("",inplace=True)
print(issues)

Output:

0  79906        None              None                   None
0  79904  2022-07-07        2022-05-18             2022-05-25
0  79903  2022-04-13        2022-04-22             2022-04-22
0  79902  2022-06-15        2022-06-04             2022-06-04
0  79901        None              None                   None
0  79900        None        2022-06-14                   None
0  79899  2022-05-06        2022-05-02             2022-05-06
0  79897        None              None                   None
0  79896        None              None                   None

Checking column types using dtypes:

id                        object
Due date                  object
Actual Start Date         object
Actual Completion Date    object
dtype: object
Discussions

python - Replace invalid values with None in Pandas DataFrame - Stack Overflow
Is there any method to replace values with None in Pandas in Python? You can use df.replace('pre', 'post') and can replace a value with another, but this can't be done if you want to replace with ... More on stackoverflow.com
🌐 stackoverflow.com
Problem with DataFrame.replace using None
The expected output would be all ... be replaced with either None or NaN, or at least a warning message alerting for this behaviour. ... commit: None python: 3.6.8.final.0 python-bits: 64 OS: Darwin OS-release: 18.5.0 machine: x86_64 processor: i386 byteorder: little LC_ALL: None LANG: en_GB.UTF-8 LOCALE: en_GB.UTF-8 · pandas: 0.24.1 pytest: ... More on github.com
🌐 github.com
7
April 11, 2019
python - Rename "None" value in Pandas - Stack Overflow
This is probably super simple but I just can not find the answer. I import data using GeoPandas from a shape file. Turn that into pandas DataFrame. I have a object field with three letter codes and... More on stackoverflow.com
🌐 stackoverflow.com
May 22, 2017
python - How to replace None only with empty string using pandas? - Stack Overflow
I would like to replace all None (real None in python, not str) inside with ''(empty string). More on stackoverflow.com
🌐 stackoverflow.com
🌐
Pandas
pandas.pydata.org › docs › reference › api › pandas.DataFrame.replace.html
pandas.DataFrame.replace — pandas 3.0.2 documentation
For a DataFrame a dict can specify ... value 1 in column ‘a’ and the value ‘z’ in column ‘b’ and replaces these values with whatever is specified in value. The value parameter should not be None in this case....
🌐
Pandas
pandas.pydata.org › docs › reference › api › pandas.DataFrame.fillna.html
pandas.DataFrame.fillna — pandas 3.0.2 documentation
For non-object dtype, value=None will use the NA value of the dtype. See more details in the Filling missing data section. ... >>> df = pd.DataFrame( ... [ ... [np.nan, 2, np.nan, 0], ... [3, 4, np.nan, 1], ... [np.nan, np.nan, np.nan, np.nan], ... [np.nan, 3, np.nan, 4], ... ], ... columns=list("ABCD"), ... ) >>> df A B C D 0 NaN 2.0 NaN 0.0 1 3.0 4.0 NaN 1.0 2 NaN NaN NaN NaN 3 NaN 3.0 NaN 4.0 · Replace all NaN elements with 0s.
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-pandas-dataframe-fillna-to-replace-null-values-in-dataframe
Pandas DataFrame.fillna() | Python - GeeksforGeeks
February 23, 2026 - Example: This example creates a DataFrame with missing values and replaces all NaN values with 0 using fillna(). ... import pandas as pd df = pd.DataFrame({"A": [1, None, 3], "B": [None, 5, 6]}) r = df.fillna(0) print(r)
Find elsewhere
🌐
Pandas
pandas.pydata.org › pandas-docs › stable › reference › api › pandas.DataFrame.replace.html
pandas.DataFrame.replace — pandas 2.3.2 documentation
Value to replace any values matching to_replace with. For a DataFrame a dict of values can be used to specify which value to use for each column (columns not in the dict will not be filled). Regular expressions, strings and lists or dicts of such objects are also allowed. ... If True, performs operation inplace and returns None.
🌐
GitHub
github.com › pandas-dev › pandas › issues › 26050
Problem with DataFrame.replace using None · Issue #26050 · pandas-dev/pandas
April 11, 2019 - Code Sample, a copy-pastable example if possible import pandas as pd import numpy as np ar = np.random.normal(size=[100,10]) df = pd.DataFrame(ar).astype(str) df.replace('0',None) Problem description Every time I run something similar to...
Author   josegcpa
🌐
Data Science Dojo
discuss.datasciencedojo.com › python
How to replace null values in a Pandas dataframe? - Python - Data Science Dojo Discussions
November 25, 2022 - We can use DataFrame.fillna() method to replace null values with any value of choice. Example
🌐
JanBask Training
janbasktraining.com › community › data-science › pandas-replace-nan-with-none
Replace None with NaN in pandas dataframe | JanBask Training Community
July 8, 2021 - I have table x: website0 http://www.google.com/1 http://www.yahoo.com2 NoneI want to replace python None with pandas NaN. I tried:x.replace(to_rep
🌐
Medium
medium.com › @whyamit101 › understanding-pandas-replace-function-c2b0b7709233
Understanding pandas replace() Function | by why amit | Medium
February 10, 2025 - It’s an essential function for ... function: ... So, in simple terms, you tell pandas, “Find all instances of to_replace in your DataFrame and swap them with value."...
🌐
Statology
statology.org › home › pandas: how to replace nan values with string
Pandas: How to Replace NaN Values with String
November 1, 2021 - This tutorial explains how to replace NaN values in a pandas DataFrame with a specific string, including several examples.
🌐
IARP
iarp.github.io › python › pandas-replace-nan-nat-with-none.html
Pandas replace all NaN and NaT values with None | IARP
View On GitHub · GitHub Profile · Pandas replace all NaN and NaT values with None · data.replace({pandas.NaT: None}, inplace=True) · Hosted on GitHub Pages using the Dinky theme
🌐
Edureka Community
edureka.co › home › community › categories › python › how to replace values with none in pandas data...
How to replace values with None in Pandas data frame in Python | Edureka Community
August 30, 2018 - Is there any method to replace values with None in Pandas in Python? You can use df.replace(' ... know why the dataframe acts in such a terrible way.
🌐
Community
community.mytectra.com › forums › information technol... › data science
Replace None with NaN in pandas dataframe
February 23, 2021 - I have table x: website 0 1 2 None I want to replace python None with pandas NaN. I tried: x.replace(to_replace=...
🌐
Pandas
pandas.pydata.org › pandas-docs › version › 2.1.4 › reference › api › pandas.DataFrame.replace.html
pandas.DataFrame.replace — pandas 2.1.4 documentation
For a DataFrame a dict can specify ... value 1 in column ‘a’ and the value ‘z’ in column ‘b’ and replaces these values with whatever is specified in value. The value parameter should not be None in this case....
🌐
Stack Overflow
stackoverflow.com › questions › 55837065 › pandas-replace-none-value
python - Pandas - Replace None Value - Stack Overflow
April 25, 2019 - try df.replace(None, 'Unknown') or df.replace('None', 'Unknown'). The way you'll do this depends on the data type of your columns and values ... df.fillna('Unknown', inplace=True) did the trick.