Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12171

Pandas: Prevent (blank) from being read as '' [duplicate]

$
0
0

I'm loading a dataframe that has a column with string (blank) in it. I want to read this as is, instead of being converted to any other form (Nan, <NA>, '' etc.).

I tried several stack overflow suggestions. The closest that answered mine was this question (keep_default_na=False), although it still converted it to empty string .

Is there any way I can get (blank) itself as a string. As it's required to not create confusion for the end user.

By the way, I also tried converting using dtype as well, but to no avail. It still converts to <NA>.


Viewing all articles
Browse latest Browse all 12171

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>