Click here to Skip to main content
15,889,315 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have made a pivot table for 4 columns. I have to plot the chart of that table.But at some places there is value NaN, which is making the plot to have gaps in between I want all the gaps to appear a line between the previous and forward point. Lets say my pivot dataframe is pivot_1

pivot_1.plot()

is showing gaps in between. Please solve this problem?


What I have tried:

pivot_1=df.pivot_tabel(index='Week', columns='Time', aggfunc='mean', values='Temp')

pivot_1.plot(use_index=True)
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900