How to subsitute 0 with nan so it will not be captured as value in st.line_chart

How should I substitute 0 with nan so it will not be captured as value in st.line_chart so my line chart will look as the first screenshot and NOT like the second?

My target is for the line to start with the first data point and not show 0 continuously (see dark blue lines below)


Screenshot 2022-11-15 at 9.18.42 PM

solution: .replace(0,float(“NaN”))