Pandas keep_default_na=False does not work
Issue
I have an Excel file (.xlsx) that contains a sheet with some values equals to '#N/A'.
When reading the Excel sheet as a DataFrame using pandas, '#N/A' values are interpreted as NaN.
Based on the pandas.read_excel guide, I expect that '#N/A' can be read 'as is' into the DataFrame by adding the keep_default_na=False
parameter.
Unfortunately '#N/A' is still interpreted as NaN.
Code
Here is the code used:
df = pd.read_excel(io='TestWorkbook.xlsx',
sheet_name="Sheet1",
keep_default_na=False)
And the result:
It seems that keep_default_na=False
worked on 'N/A' and 'NA' values but not '#N/A'.
Question
Do you know any workaround to reading '#N/A' as-is into the DataFrame?
python excel pandas
add a comment |
Issue
I have an Excel file (.xlsx) that contains a sheet with some values equals to '#N/A'.
When reading the Excel sheet as a DataFrame using pandas, '#N/A' values are interpreted as NaN.
Based on the pandas.read_excel guide, I expect that '#N/A' can be read 'as is' into the DataFrame by adding the keep_default_na=False
parameter.
Unfortunately '#N/A' is still interpreted as NaN.
Code
Here is the code used:
df = pd.read_excel(io='TestWorkbook.xlsx',
sheet_name="Sheet1",
keep_default_na=False)
And the result:
It seems that keep_default_na=False
worked on 'N/A' and 'NA' values but not '#N/A'.
Question
Do you know any workaround to reading '#N/A' as-is into the DataFrame?
python excel pandas
Could you upload your excel sheet somewhere so I can try it?
– Scotty1-
Nov 19 '18 at 13:43
@Scotty1- Probably not a good idea to download random files on the internet ;)
– J100
Nov 19 '18 at 14:02
True, but that would have made it easier to try finding a solution. :)
– Scotty1-
Nov 19 '18 at 14:08
worth exploringna_filter=False
insteadkeep_default_na=False
– pygo
Nov 19 '18 at 14:32
add a comment |
Issue
I have an Excel file (.xlsx) that contains a sheet with some values equals to '#N/A'.
When reading the Excel sheet as a DataFrame using pandas, '#N/A' values are interpreted as NaN.
Based on the pandas.read_excel guide, I expect that '#N/A' can be read 'as is' into the DataFrame by adding the keep_default_na=False
parameter.
Unfortunately '#N/A' is still interpreted as NaN.
Code
Here is the code used:
df = pd.read_excel(io='TestWorkbook.xlsx',
sheet_name="Sheet1",
keep_default_na=False)
And the result:
It seems that keep_default_na=False
worked on 'N/A' and 'NA' values but not '#N/A'.
Question
Do you know any workaround to reading '#N/A' as-is into the DataFrame?
python excel pandas
Issue
I have an Excel file (.xlsx) that contains a sheet with some values equals to '#N/A'.
When reading the Excel sheet as a DataFrame using pandas, '#N/A' values are interpreted as NaN.
Based on the pandas.read_excel guide, I expect that '#N/A' can be read 'as is' into the DataFrame by adding the keep_default_na=False
parameter.
Unfortunately '#N/A' is still interpreted as NaN.
Code
Here is the code used:
df = pd.read_excel(io='TestWorkbook.xlsx',
sheet_name="Sheet1",
keep_default_na=False)
And the result:
It seems that keep_default_na=False
worked on 'N/A' and 'NA' values but not '#N/A'.
Question
Do you know any workaround to reading '#N/A' as-is into the DataFrame?
python excel pandas
python excel pandas
edited Nov 19 '18 at 13:50


jpp
91.9k2052102
91.9k2052102
asked Nov 19 '18 at 13:25
J100
951413
951413
Could you upload your excel sheet somewhere so I can try it?
– Scotty1-
Nov 19 '18 at 13:43
@Scotty1- Probably not a good idea to download random files on the internet ;)
– J100
Nov 19 '18 at 14:02
True, but that would have made it easier to try finding a solution. :)
– Scotty1-
Nov 19 '18 at 14:08
worth exploringna_filter=False
insteadkeep_default_na=False
– pygo
Nov 19 '18 at 14:32
add a comment |
Could you upload your excel sheet somewhere so I can try it?
– Scotty1-
Nov 19 '18 at 13:43
@Scotty1- Probably not a good idea to download random files on the internet ;)
– J100
Nov 19 '18 at 14:02
True, but that would have made it easier to try finding a solution. :)
– Scotty1-
Nov 19 '18 at 14:08
worth exploringna_filter=False
insteadkeep_default_na=False
– pygo
Nov 19 '18 at 14:32
Could you upload your excel sheet somewhere so I can try it?
– Scotty1-
Nov 19 '18 at 13:43
Could you upload your excel sheet somewhere so I can try it?
– Scotty1-
Nov 19 '18 at 13:43
@Scotty1- Probably not a good idea to download random files on the internet ;)
– J100
Nov 19 '18 at 14:02
@Scotty1- Probably not a good idea to download random files on the internet ;)
– J100
Nov 19 '18 at 14:02
True, but that would have made it easier to try finding a solution. :)
– Scotty1-
Nov 19 '18 at 14:08
True, but that would have made it easier to try finding a solution. :)
– Scotty1-
Nov 19 '18 at 14:08
worth exploring
na_filter=False
instead keep_default_na=False
– pygo
Nov 19 '18 at 14:32
worth exploring
na_filter=False
instead keep_default_na=False
– pygo
Nov 19 '18 at 14:32
add a comment |
2 Answers
2
active
oldest
votes
That's because Excel isn't storing those #N/A
values in column B as strings. There's a visual indication of this if you notice those #N/A
cells are centre-aligned.
Pandas won't differentiate between different types of Excel errors: #N/A
/ #NUM!
/ #NAME?
/ #VALUE!
etc will all come through as NaN
. Which makes sense, there isn't a parallel Python/C type for every Excel error.
So, in short, with pd.read_excel
there's nothing you can do except override all errors with a specific string, e.g. '#N/A'
, and lose all knowledge of the specific error type(s) you find by opening the file in Excel:
df['Column2'] = df['Column2'].fillna('#N/A')
The alternative is to force Excel to use text values, e.g. by inserting into an Excel cell:
=TEXT("#N/A", "")
Then read using pd.read_excel
with keep_default_na=False
. This seems more trouble than it's worth.
Oh right. But why is my solution working on my computer? Is there some Excel-internals for defining NA-values depending on the region or version number of Excel? I'm using a german version of excel 2010 and#N/A
is definitely stored as a string even when the format of the cell is chosen as number format...
– Scotty1-
Nov 19 '18 at 13:41
@Scotty1-, No idea. Neither of your solutions work for me.
– jpp
Nov 19 '18 at 13:42
Will not thatfillna('#N/A')
will replace all Nan to#N/A
regardless if its NaN or #N/A
– pygo
Nov 19 '18 at 13:43
1
@pygo, No,fillna
will only replaceNaN
with'#N/A'
. It won't replace'#N/A'
because those are strings (notNaN
).
– jpp
Nov 19 '18 at 13:45
1
@pygo- How will that preserve the '#N/A'? Specifying it inna_values
is basically telling pandas to interpret '#N/A' as NaN.
– J100
Nov 19 '18 at 14:01
|
show 11 more comments
Try:
df = pd.read_excel(
io='TestWorkbook.xlsx',
sheet_name="Sheet1",
na_values='', keep_default_na=False
)
If you specify keep_default_na=False
, the values given in na_values
will overwrite the default NA-values. Since your NA-values are in the default NA-values, you need to specify some na_values='some_dummy_na_value'
the use this to overwrite the default NA-values.
If you for example want to keep interpreting N/A
and NA
as NA-values (while keeping #N/A
as a string), you can specify them in the na_values
parameter:
df = pd.read_excel(
io='TestWorkbook.xlsx',
sheet_name="Sheet1",
na_values=['N/A', 'NA'], keep_default_na=False
)
1
No luck. Thanks for the suggestion.
– J100
Nov 19 '18 at 13:30
You are welcome. But it should work. I just tried it... In my case#N/A
is loaded into the df as a string'#N/A'
.
– Scotty1-
Nov 19 '18 at 13:33
That's odd. I don't suppose my operating system and installed libraries have anything to do with it. I'll set up another virtual environment and with new installation of pandas and other necessary libraries before trying again.
– J100
Nov 19 '18 at 13:36
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53375623%2fpandas-keep-default-na-false-does-not-work%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
That's because Excel isn't storing those #N/A
values in column B as strings. There's a visual indication of this if you notice those #N/A
cells are centre-aligned.
Pandas won't differentiate between different types of Excel errors: #N/A
/ #NUM!
/ #NAME?
/ #VALUE!
etc will all come through as NaN
. Which makes sense, there isn't a parallel Python/C type for every Excel error.
So, in short, with pd.read_excel
there's nothing you can do except override all errors with a specific string, e.g. '#N/A'
, and lose all knowledge of the specific error type(s) you find by opening the file in Excel:
df['Column2'] = df['Column2'].fillna('#N/A')
The alternative is to force Excel to use text values, e.g. by inserting into an Excel cell:
=TEXT("#N/A", "")
Then read using pd.read_excel
with keep_default_na=False
. This seems more trouble than it's worth.
Oh right. But why is my solution working on my computer? Is there some Excel-internals for defining NA-values depending on the region or version number of Excel? I'm using a german version of excel 2010 and#N/A
is definitely stored as a string even when the format of the cell is chosen as number format...
– Scotty1-
Nov 19 '18 at 13:41
@Scotty1-, No idea. Neither of your solutions work for me.
– jpp
Nov 19 '18 at 13:42
Will not thatfillna('#N/A')
will replace all Nan to#N/A
regardless if its NaN or #N/A
– pygo
Nov 19 '18 at 13:43
1
@pygo, No,fillna
will only replaceNaN
with'#N/A'
. It won't replace'#N/A'
because those are strings (notNaN
).
– jpp
Nov 19 '18 at 13:45
1
@pygo- How will that preserve the '#N/A'? Specifying it inna_values
is basically telling pandas to interpret '#N/A' as NaN.
– J100
Nov 19 '18 at 14:01
|
show 11 more comments
That's because Excel isn't storing those #N/A
values in column B as strings. There's a visual indication of this if you notice those #N/A
cells are centre-aligned.
Pandas won't differentiate between different types of Excel errors: #N/A
/ #NUM!
/ #NAME?
/ #VALUE!
etc will all come through as NaN
. Which makes sense, there isn't a parallel Python/C type for every Excel error.
So, in short, with pd.read_excel
there's nothing you can do except override all errors with a specific string, e.g. '#N/A'
, and lose all knowledge of the specific error type(s) you find by opening the file in Excel:
df['Column2'] = df['Column2'].fillna('#N/A')
The alternative is to force Excel to use text values, e.g. by inserting into an Excel cell:
=TEXT("#N/A", "")
Then read using pd.read_excel
with keep_default_na=False
. This seems more trouble than it's worth.
Oh right. But why is my solution working on my computer? Is there some Excel-internals for defining NA-values depending on the region or version number of Excel? I'm using a german version of excel 2010 and#N/A
is definitely stored as a string even when the format of the cell is chosen as number format...
– Scotty1-
Nov 19 '18 at 13:41
@Scotty1-, No idea. Neither of your solutions work for me.
– jpp
Nov 19 '18 at 13:42
Will not thatfillna('#N/A')
will replace all Nan to#N/A
regardless if its NaN or #N/A
– pygo
Nov 19 '18 at 13:43
1
@pygo, No,fillna
will only replaceNaN
with'#N/A'
. It won't replace'#N/A'
because those are strings (notNaN
).
– jpp
Nov 19 '18 at 13:45
1
@pygo- How will that preserve the '#N/A'? Specifying it inna_values
is basically telling pandas to interpret '#N/A' as NaN.
– J100
Nov 19 '18 at 14:01
|
show 11 more comments
That's because Excel isn't storing those #N/A
values in column B as strings. There's a visual indication of this if you notice those #N/A
cells are centre-aligned.
Pandas won't differentiate between different types of Excel errors: #N/A
/ #NUM!
/ #NAME?
/ #VALUE!
etc will all come through as NaN
. Which makes sense, there isn't a parallel Python/C type for every Excel error.
So, in short, with pd.read_excel
there's nothing you can do except override all errors with a specific string, e.g. '#N/A'
, and lose all knowledge of the specific error type(s) you find by opening the file in Excel:
df['Column2'] = df['Column2'].fillna('#N/A')
The alternative is to force Excel to use text values, e.g. by inserting into an Excel cell:
=TEXT("#N/A", "")
Then read using pd.read_excel
with keep_default_na=False
. This seems more trouble than it's worth.
That's because Excel isn't storing those #N/A
values in column B as strings. There's a visual indication of this if you notice those #N/A
cells are centre-aligned.
Pandas won't differentiate between different types of Excel errors: #N/A
/ #NUM!
/ #NAME?
/ #VALUE!
etc will all come through as NaN
. Which makes sense, there isn't a parallel Python/C type for every Excel error.
So, in short, with pd.read_excel
there's nothing you can do except override all errors with a specific string, e.g. '#N/A'
, and lose all knowledge of the specific error type(s) you find by opening the file in Excel:
df['Column2'] = df['Column2'].fillna('#N/A')
The alternative is to force Excel to use text values, e.g. by inserting into an Excel cell:
=TEXT("#N/A", "")
Then read using pd.read_excel
with keep_default_na=False
. This seems more trouble than it's worth.
edited Nov 19 '18 at 14:03
answered Nov 19 '18 at 13:37


jpp
91.9k2052102
91.9k2052102
Oh right. But why is my solution working on my computer? Is there some Excel-internals for defining NA-values depending on the region or version number of Excel? I'm using a german version of excel 2010 and#N/A
is definitely stored as a string even when the format of the cell is chosen as number format...
– Scotty1-
Nov 19 '18 at 13:41
@Scotty1-, No idea. Neither of your solutions work for me.
– jpp
Nov 19 '18 at 13:42
Will not thatfillna('#N/A')
will replace all Nan to#N/A
regardless if its NaN or #N/A
– pygo
Nov 19 '18 at 13:43
1
@pygo, No,fillna
will only replaceNaN
with'#N/A'
. It won't replace'#N/A'
because those are strings (notNaN
).
– jpp
Nov 19 '18 at 13:45
1
@pygo- How will that preserve the '#N/A'? Specifying it inna_values
is basically telling pandas to interpret '#N/A' as NaN.
– J100
Nov 19 '18 at 14:01
|
show 11 more comments
Oh right. But why is my solution working on my computer? Is there some Excel-internals for defining NA-values depending on the region or version number of Excel? I'm using a german version of excel 2010 and#N/A
is definitely stored as a string even when the format of the cell is chosen as number format...
– Scotty1-
Nov 19 '18 at 13:41
@Scotty1-, No idea. Neither of your solutions work for me.
– jpp
Nov 19 '18 at 13:42
Will not thatfillna('#N/A')
will replace all Nan to#N/A
regardless if its NaN or #N/A
– pygo
Nov 19 '18 at 13:43
1
@pygo, No,fillna
will only replaceNaN
with'#N/A'
. It won't replace'#N/A'
because those are strings (notNaN
).
– jpp
Nov 19 '18 at 13:45
1
@pygo- How will that preserve the '#N/A'? Specifying it inna_values
is basically telling pandas to interpret '#N/A' as NaN.
– J100
Nov 19 '18 at 14:01
Oh right. But why is my solution working on my computer? Is there some Excel-internals for defining NA-values depending on the region or version number of Excel? I'm using a german version of excel 2010 and
#N/A
is definitely stored as a string even when the format of the cell is chosen as number format...– Scotty1-
Nov 19 '18 at 13:41
Oh right. But why is my solution working on my computer? Is there some Excel-internals for defining NA-values depending on the region or version number of Excel? I'm using a german version of excel 2010 and
#N/A
is definitely stored as a string even when the format of the cell is chosen as number format...– Scotty1-
Nov 19 '18 at 13:41
@Scotty1-, No idea. Neither of your solutions work for me.
– jpp
Nov 19 '18 at 13:42
@Scotty1-, No idea. Neither of your solutions work for me.
– jpp
Nov 19 '18 at 13:42
Will not that
fillna('#N/A')
will replace all Nan to #N/A
regardless if its NaN or #N/A– pygo
Nov 19 '18 at 13:43
Will not that
fillna('#N/A')
will replace all Nan to #N/A
regardless if its NaN or #N/A– pygo
Nov 19 '18 at 13:43
1
1
@pygo, No,
fillna
will only replace NaN
with '#N/A'
. It won't replace '#N/A'
because those are strings (not NaN
).– jpp
Nov 19 '18 at 13:45
@pygo, No,
fillna
will only replace NaN
with '#N/A'
. It won't replace '#N/A'
because those are strings (not NaN
).– jpp
Nov 19 '18 at 13:45
1
1
@pygo- How will that preserve the '#N/A'? Specifying it in
na_values
is basically telling pandas to interpret '#N/A' as NaN.– J100
Nov 19 '18 at 14:01
@pygo- How will that preserve the '#N/A'? Specifying it in
na_values
is basically telling pandas to interpret '#N/A' as NaN.– J100
Nov 19 '18 at 14:01
|
show 11 more comments
Try:
df = pd.read_excel(
io='TestWorkbook.xlsx',
sheet_name="Sheet1",
na_values='', keep_default_na=False
)
If you specify keep_default_na=False
, the values given in na_values
will overwrite the default NA-values. Since your NA-values are in the default NA-values, you need to specify some na_values='some_dummy_na_value'
the use this to overwrite the default NA-values.
If you for example want to keep interpreting N/A
and NA
as NA-values (while keeping #N/A
as a string), you can specify them in the na_values
parameter:
df = pd.read_excel(
io='TestWorkbook.xlsx',
sheet_name="Sheet1",
na_values=['N/A', 'NA'], keep_default_na=False
)
1
No luck. Thanks for the suggestion.
– J100
Nov 19 '18 at 13:30
You are welcome. But it should work. I just tried it... In my case#N/A
is loaded into the df as a string'#N/A'
.
– Scotty1-
Nov 19 '18 at 13:33
That's odd. I don't suppose my operating system and installed libraries have anything to do with it. I'll set up another virtual environment and with new installation of pandas and other necessary libraries before trying again.
– J100
Nov 19 '18 at 13:36
add a comment |
Try:
df = pd.read_excel(
io='TestWorkbook.xlsx',
sheet_name="Sheet1",
na_values='', keep_default_na=False
)
If you specify keep_default_na=False
, the values given in na_values
will overwrite the default NA-values. Since your NA-values are in the default NA-values, you need to specify some na_values='some_dummy_na_value'
the use this to overwrite the default NA-values.
If you for example want to keep interpreting N/A
and NA
as NA-values (while keeping #N/A
as a string), you can specify them in the na_values
parameter:
df = pd.read_excel(
io='TestWorkbook.xlsx',
sheet_name="Sheet1",
na_values=['N/A', 'NA'], keep_default_na=False
)
1
No luck. Thanks for the suggestion.
– J100
Nov 19 '18 at 13:30
You are welcome. But it should work. I just tried it... In my case#N/A
is loaded into the df as a string'#N/A'
.
– Scotty1-
Nov 19 '18 at 13:33
That's odd. I don't suppose my operating system and installed libraries have anything to do with it. I'll set up another virtual environment and with new installation of pandas and other necessary libraries before trying again.
– J100
Nov 19 '18 at 13:36
add a comment |
Try:
df = pd.read_excel(
io='TestWorkbook.xlsx',
sheet_name="Sheet1",
na_values='', keep_default_na=False
)
If you specify keep_default_na=False
, the values given in na_values
will overwrite the default NA-values. Since your NA-values are in the default NA-values, you need to specify some na_values='some_dummy_na_value'
the use this to overwrite the default NA-values.
If you for example want to keep interpreting N/A
and NA
as NA-values (while keeping #N/A
as a string), you can specify them in the na_values
parameter:
df = pd.read_excel(
io='TestWorkbook.xlsx',
sheet_name="Sheet1",
na_values=['N/A', 'NA'], keep_default_na=False
)
Try:
df = pd.read_excel(
io='TestWorkbook.xlsx',
sheet_name="Sheet1",
na_values='', keep_default_na=False
)
If you specify keep_default_na=False
, the values given in na_values
will overwrite the default NA-values. Since your NA-values are in the default NA-values, you need to specify some na_values='some_dummy_na_value'
the use this to overwrite the default NA-values.
If you for example want to keep interpreting N/A
and NA
as NA-values (while keeping #N/A
as a string), you can specify them in the na_values
parameter:
df = pd.read_excel(
io='TestWorkbook.xlsx',
sheet_name="Sheet1",
na_values=['N/A', 'NA'], keep_default_na=False
)
edited Nov 19 '18 at 13:37
answered Nov 19 '18 at 13:27
Scotty1-
1,4461321
1,4461321
1
No luck. Thanks for the suggestion.
– J100
Nov 19 '18 at 13:30
You are welcome. But it should work. I just tried it... In my case#N/A
is loaded into the df as a string'#N/A'
.
– Scotty1-
Nov 19 '18 at 13:33
That's odd. I don't suppose my operating system and installed libraries have anything to do with it. I'll set up another virtual environment and with new installation of pandas and other necessary libraries before trying again.
– J100
Nov 19 '18 at 13:36
add a comment |
1
No luck. Thanks for the suggestion.
– J100
Nov 19 '18 at 13:30
You are welcome. But it should work. I just tried it... In my case#N/A
is loaded into the df as a string'#N/A'
.
– Scotty1-
Nov 19 '18 at 13:33
That's odd. I don't suppose my operating system and installed libraries have anything to do with it. I'll set up another virtual environment and with new installation of pandas and other necessary libraries before trying again.
– J100
Nov 19 '18 at 13:36
1
1
No luck. Thanks for the suggestion.
– J100
Nov 19 '18 at 13:30
No luck. Thanks for the suggestion.
– J100
Nov 19 '18 at 13:30
You are welcome. But it should work. I just tried it... In my case
#N/A
is loaded into the df as a string '#N/A'
.– Scotty1-
Nov 19 '18 at 13:33
You are welcome. But it should work. I just tried it... In my case
#N/A
is loaded into the df as a string '#N/A'
.– Scotty1-
Nov 19 '18 at 13:33
That's odd. I don't suppose my operating system and installed libraries have anything to do with it. I'll set up another virtual environment and with new installation of pandas and other necessary libraries before trying again.
– J100
Nov 19 '18 at 13:36
That's odd. I don't suppose my operating system and installed libraries have anything to do with it. I'll set up another virtual environment and with new installation of pandas and other necessary libraries before trying again.
– J100
Nov 19 '18 at 13:36
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53375623%2fpandas-keep-default-na-false-does-not-work%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Could you upload your excel sheet somewhere so I can try it?
– Scotty1-
Nov 19 '18 at 13:43
@Scotty1- Probably not a good idea to download random files on the internet ;)
– J100
Nov 19 '18 at 14:02
True, but that would have made it easier to try finding a solution. :)
– Scotty1-
Nov 19 '18 at 14:08
worth exploring
na_filter=False
insteadkeep_default_na=False
– pygo
Nov 19 '18 at 14:32