1

So, I have values that look like this. Now, with pandas plotting function, like upperband.plot(), it shows broken line for the first few values like below:

2015-03-12           NaN
2015-03-13           NaN
2015-03-16           NaN
2015-03-17           NaN
2015-03-18           NaN
2015-03-19           NaN
2015-03-20           NaN
2015-03-23           NaN
2015-03-24           NaN
2015-03-25           NaN
2015-03-26           NaN
2015-03-27           NaN
2015-03-30           NaN
2015-03-31           NaN
2015-04-01           NaN
2015-04-02           NaN
2015-04-06           NaN
2015-04-07           NaN
2015-04-08           NaN
2015-04-09    567.812173
2015-04-10    567.456120
2015-04-13    567.607916
2015-04-14    567.968762

enter image description here

How can I ignore these NaN values? I want to start with a smooth line and ignore the broken line

2

1 Answer 1

1

If you want to just ignore the data that is missing you can use

df = df.dropna()
Sign up to request clarification or add additional context in comments.

1 Comment

your first answer would be better as df = df.dropna() as shown in the two link I provided. Your second answer misses the mark as the OP clearly stated that NaNs should be ignored.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.