Quantcast
Channel: Data Science, Analytics and Big Data discussions - Latest topics
Viewing all articles
Browse latest Browse all 4448

How to handle 'NaN' Values in Dataframe

$
0
0

@sachin123456 wrote:

Hi,

I have requirement that- Import data from one excel to another application

  1. I have imported the data to dataframe.
  2. putting each cell data to application using REST API.
  3. when I dont have any data in excel - the data frame has the value ‘NaN’

while running my code it says -

{“statusCode”:400,“titleMessage”:“Bad Request”,“helpMessage”:“Please correct the input object”,“userMessage”:“There was an error while processing JSON content. The original message was: ‘Non-standard token ‘NaN’: enable JsonParser.Feature.ALLOW_NON_NUMERIC_NUMBERS to allow\n at [Source: org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream@44c37792; line: 1, column: 116]’”}

After that I have used fillna(" ")
it throws error:
{“statusCode”:400,“titleMessage”:“Value not allowed”,“userMessage”:“The numeric attribute ‘’ has an invalid value ({1}).”,“errorCode”:“attDoubleValueInvalid”}

Can Somebody help me out here.

Thanks,
Sachin

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles