Line plot missing a lot of data while scatter plot not

With the same data source, if plot with line, a lot of data are missing. However, scatter plot don’t have such issue. Below is my code and csv contents. Could someone point out why line plot and scatter plot has such huge difference? Is it an API issue?

import pandas as pd
import bokeh.io
from bokeh.plotting import figure
from bokeh.models import ColumnDataSource, DatetimeTickFormatter


def plot_example(line_type, html_name):
    colorSets = ['#0000FF', '#EE4000']
    markerList = ['circle', 'cross']
    df = pd.read_csv('11.csv', parse_dates=['Time_stamp'])
    colorCounter = 0
    deviceName = ['D1', 'D2']
    p = figure(title=f"Time V.S. Record", x_axis_label='Time_stamp', y_axis_label='Record', background_fill_color="#fafafa",
               x_axis_type='datetime', plot_width=1200, plot_height=300, output_backend="webgl",
               tools='box_zoom, pan, undo, redo, reset, crosshair, hover')
    xformatter = DatetimeTickFormatter(milliseconds=['%H:%M:%S %3Nms'], seconds=['%H:%M:%S'], minutes=['%H:%M'],
                                           hours=['%H:%M'], days=['%m-%d'], months=['%Y-%m'], years=['%Y'],
                                           hourmin=['%H:%M'], minsec=['%H:%M:%S'])
    bokeh.io.output_file(filename=html_name, title='test')
    p.xaxis.formatter = xformatter
    source = ColumnDataSource(df)
    for m in deviceName:
        if line_type == 'Scatter':
            p.scatter(x='Time_stamp', y=m, source=source, color=colorSets[colorCounter], legend_label=m, marker=markerList[colorCounter])
        else:
            p.line(x='Time_stamp', y=m, source=source, color=colorSets[colorCounter], legend_label=m)
        colorCounter += 1
    p.legend.click_policy = "hide"
    p.legend.location = 'bottom_right'
    bokeh.io.save(p, filename=html_name)


plot_example('Scatter', 'scatter.html')
plot_example('line', 'line.html')

Below is the csv data, I don’t find any method to attach csv file, thus write it here

Time_stamp,D1,D2
2022-05-27 07:38:53.411,,0.0
2022-05-27 07:38:53.611,,0.0
2022-05-27 07:38:54.811,,0.0
2022-05-27 07:38:55.025,0.0,
2022-05-27 07:38:55.811,,0.0
2022-05-27 07:38:56.025,0.0,
2022-05-27 07:38:56.211,,0.0
2022-05-27 07:38:57.411,,0.0
2022-05-27 07:38:57.425,0.0,
2022-05-27 07:38:58.411,,0.0
2022-05-27 07:38:58.625,0.0,
2022-05-27 07:38:58.811,,0.0
2022-05-27 07:39:00.011,,0.0
2022-05-27 07:39:00.025,0.0,
2022-05-27 07:39:01.025,0.0,
2022-05-27 07:39:01.211,,0.0
2022-05-27 07:39:01.411,,0.0
2022-05-27 07:39:02.611,,0.0
2022-05-27 07:39:02.625,0.0,
2022-05-27 07:39:03.825,0.0,
2022-05-27 07:39:04.011,,0.0
2022-05-27 07:39:05.025,0.0,
2022-05-27 07:39:05.211,,0.0
2022-05-27 07:39:06.025,0.0,
2022-05-27 07:39:06.211,,0.0
2022-05-27 07:39:06.225,0.0,
2022-05-27 07:39:06.411,,0.0
2022-05-27 07:39:06.425,46.15384615384615,
2022-05-27 07:39:06.611,,0.0
2022-05-27 07:39:06.625,42.857142857142854,
2022-05-27 07:39:06.811,,5.405405405405405
2022-05-27 07:39:06.825,0.0,
2022-05-27 07:39:07.011,,2.5
2022-05-27 07:39:07.025,0.0,
2022-05-27 07:39:07.211,,0.0
2022-05-27 07:39:07.225,12.5,
2022-05-27 07:39:07.411,,0.0
2022-05-27 07:39:07.425,15.0,
2022-05-27 07:39:07.611,,0.0
2022-05-27 07:39:07.625,7.5,
2022-05-27 07:39:07.811,,0.0
2022-05-27 07:39:07.825,0.0,
2022-05-27 07:39:08.011,,0.0
2022-05-27 07:39:08.025,10.0,
2022-05-27 07:39:08.211,,0.0
2022-05-27 07:39:08.225,20.0,
2022-05-27 07:39:08.411,,0.0
2022-05-27 07:39:08.425,10.0,
2022-05-27 07:39:08.611,,2.5
2022-05-27 07:39:08.625,7.5,
2022-05-27 07:39:08.811,,2.5
2022-05-27 07:39:08.825,7.5,
2022-05-27 07:39:09.011,,0.0
2022-05-27 07:39:09.025,17.142857142857142,
2022-05-27 07:39:09.211,,0.0
2022-05-27 07:39:09.225,12.5,
2022-05-27 07:39:09.411,,2.5
2022-05-27 07:39:09.425,7.5,
2022-05-27 07:39:09.611,,5.0
2022-05-27 07:39:09.625,7.5,
2022-05-27 07:39:09.811,,0.0
2022-05-27 07:39:09.825,7.5,
2022-05-27 07:39:10.011,,2.5
2022-05-27 07:39:10.025,10.0,
2022-05-27 07:39:10.211,,2.5
2022-05-27 07:39:10.225,7.5,
2022-05-27 07:39:10.411,,2.564102564102564
2022-05-27 07:39:10.425,15.0,
2022-05-27 07:39:10.611,,2.5
2022-05-27 07:39:10.625,7.5,
2022-05-27 07:39:10.811,,0.0
2022-05-27 07:39:10.825,5.0,
2022-05-27 07:39:11.011,,0.0
2022-05-27 07:39:11.025,5.0,
2022-05-27 07:39:11.211,,0.0
2022-05-27 07:39:11.225,15.0,
2022-05-27 07:39:11.411,,0.0
2022-05-27 07:39:11.425,15.0,
2022-05-27 07:39:11.611,,0.0
2022-05-27 07:39:11.625,7.894736842105263,
2022-05-27 07:39:11.811,,2.631578947368421
2022-05-27 07:39:11.825,7.5,
2022-05-27 07:39:12.011,,2.564102564102564
2022-05-27 07:39:12.025,12.5,
2022-05-27 07:39:12.211,,0.0
2022-05-27 07:39:12.225,10.256410256410255,
2022-05-27 07:39:12.411,,2.564102564102564
2022-05-27 07:39:12.425,10.256410256410255,
2022-05-27 07:39:12.611,,2.5
2022-05-27 07:39:12.625,7.5,
2022-05-27 07:39:12.811,,2.564102564102564
2022-05-27 07:39:12.825,5.0,
2022-05-27 07:39:13.011,,0.0
2022-05-27 07:39:13.025,10.81081081081081,
2022-05-27 07:39:13.211,,5.128205128205128
2022-05-27 07:39:13.225,7.6923076923076925,
2022-05-27 07:39:13.411,,0.0
2022-05-27 07:39:13.425,8.571428571428571,
2022-05-27 07:39:13.611,,2.564102564102564
2022-05-27 07:39:13.625,7.6923076923076925,
2022-05-27 07:39:13.811,,2.7777777777777777
2022-05-27 07:39:13.825,7.5,
2022-05-27 07:39:14.011,,2.5
2022-05-27 07:39:14.025,8.108108108108109,
2022-05-27 07:39:14.211,,2.564102564102564
2022-05-27 07:39:14.225,11.538461538461538,
2022-05-27 07:39:14.411,,0.0
2022-05-27 07:39:14.425,5.263157894736842,
2022-05-27 07:39:14.611,,5.263157894736842
2022-05-27 07:39:14.625,7.6923076923076925,
2022-05-27 07:39:14.811,,0.0
2022-05-27 07:39:14.825,12.5,
2022-05-27 07:39:15.011,,2.5
2022-05-27 07:39:15.025,12.5,
2022-05-27 07:39:15.211,,0.0
2022-05-27 07:39:15.225,10.0,
2022-05-27 07:39:15.411,,0.0
2022-05-27 07:39:15.425,10.0,
2022-05-27 07:39:15.611,,0.0
2022-05-27 07:39:15.625,13.513513513513514,
2022-05-27 07:39:15.811,,2.5
2022-05-27 07:39:15.825,15.0,
2022-05-27 07:39:16.011,,0.0
2022-05-27 07:39:16.025,5.0,
2022-05-27 07:39:16.211,,5.0
2022-05-27 07:39:16.225,12.5,
2022-05-27 07:39:16.411,,0.0
2022-05-27 07:39:16.425,7.5,
2022-05-27 07:39:16.611,,7.5
2022-05-27 07:39:16.625,12.5,
2022-05-27 07:39:16.811,,5.0
2022-05-27 07:39:16.825,10.256410256410255,
2022-05-27 07:39:17.011,,0.0
2022-05-27 07:39:17.025,10.256410256410255,
2022-05-27 07:39:17.211,,2.5
2022-05-27 07:39:17.225,7.5,
2022-05-27 07:39:17.411,,2.5
2022-05-27 07:39:17.425,7.5,
2022-05-27 07:39:17.611,,0.0
2022-05-27 07:39:17.625,2.5,
2022-05-27 07:39:17.811,,2.5
2022-05-27 07:39:17.825,10.256410256410255,
2022-05-27 07:39:18.011,,2.5
2022-05-27 07:39:18.025,7.5,
2022-05-27 07:39:18.211,,2.5
2022-05-27 07:39:18.225,8.823529411764707,
2022-05-27 07:39:18.411,,2.5
2022-05-27 07:39:18.425,7.5,
2022-05-27 07:39:18.611,,5.0
2022-05-27 07:39:18.625,10.0,
2022-05-27 07:39:18.811,,0.0
2022-05-27 07:39:18.825,7.5,
2022-05-27 07:39:19.011,,2.5
2022-05-27 07:39:19.025,10.0,
2022-05-27 07:39:19.211,,0.0
2022-05-27 07:39:19.225,7.5,
2022-05-27 07:39:19.411,,0.0
2022-05-27 07:39:19.425,5.405405405405405,
2022-05-27 07:39:19.611,,0.0
2022-05-27 07:39:19.625,10.0,
2022-05-27 07:39:19.811,,0.0
2022-05-27 07:39:19.825,7.5,
2022-05-27 07:39:20.011,,0.0
2022-05-27 07:39:20.025,5.0,
2022-05-27 07:39:20.211,,2.5
2022-05-27 07:39:20.225,12.5,
2022-05-27 07:39:20.411,,2.5
2022-05-27 07:39:20.425,7.5,
2022-05-27 07:39:20.611,,0.0
2022-05-27 07:39:20.625,12.5,
2022-05-27 07:39:20.811,,2.564102564102564
2022-05-27 07:39:20.825,11.428571428571429,
2022-05-27 07:39:21.011,,0.0
2022-05-27 07:39:21.025,10.0,
2022-05-27 07:39:21.211,,0.0
2022-05-27 07:39:21.225,12.82051282051282,
2022-05-27 07:39:21.411,,2.5
2022-05-27 07:39:21.425,12.5,
2022-05-27 07:39:21.611,,2.5
2022-05-27 07:39:21.625,5.0,
2022-05-27 07:39:21.811,,0.0
2022-05-27 07:39:21.825,5.0,
2022-05-27 07:39:22.011,,2.564102564102564
2022-05-27 07:39:22.025,10.526315789473683,
2022-05-27 07:39:22.211,,0.0
2022-05-27 07:39:22.225,7.5,
2022-05-27 07:39:22.411,,2.5
2022-05-27 07:39:22.425,5.0,
2022-05-27 07:39:22.611,,0.0
2022-05-27 07:39:22.625,5.0,
2022-05-27 07:39:22.811,,5.0
2022-05-27 07:39:22.825,7.5,
2022-05-27 07:39:23.011,,0.0
2022-05-27 07:39:23.025,10.0,
2022-05-27 07:39:23.211,,0.0
2022-05-27 07:39:23.225,12.5,
2022-05-27 07:39:23.411,,2.631578947368421
2022-05-27 07:39:23.425,7.6923076923076925,
2022-05-27 07:39:23.611,,2.5
2022-05-27 07:39:23.625,15.0,
2022-05-27 07:39:23.811,,2.5
2022-05-27 07:39:23.825,2.564102564102564,
2022-05-27 07:39:24.011,,0.0
2022-05-27 07:39:24.025,7.5,
2022-05-27 07:39:24.211,,0.0
2022-05-27 07:39:24.225,7.5,
2022-05-27 07:39:24.411,,0.0
2022-05-27 07:39:24.425,5.128205128205128,
2022-05-27 07:39:24.611,,0.0
2022-05-27 07:39:24.625,13.157894736842104,
2022-05-27 07:39:24.811,,0.0
2022-05-27 07:39:24.825,10.0,
2022-05-27 07:39:25.011,,0.0
2022-05-27 07:39:25.025,5.0,
2022-05-27 07:39:25.211,,0.0
2022-05-27 07:39:25.225,10.0,
2022-05-27 07:39:25.411,,0.0
2022-05-27 07:39:25.425,15.384615384615385,
2022-05-27 07:39:25.611,,0.0
2022-05-27 07:39:25.625,15.0,
2022-05-27 07:39:25.811,,0.0
2022-05-27 07:39:25.825,12.82051282051282,
2022-05-27 07:39:26.011,,0.0
2022-05-27 07:39:26.025,16.216216216216218,
2022-05-27 07:39:26.211,,2.5
2022-05-27 07:39:26.225,7.5,
2022-05-27 07:39:26.411,,0.0
2022-05-27 07:39:26.425,7.5,
2022-05-27 07:39:26.611,,2.5
2022-05-27 07:39:26.625,10.0,
2022-05-27 07:39:26.811,,2.564102564102564
2022-05-27 07:39:26.825,7.5,
2022-05-27 07:39:27.011,,2.564102564102564
2022-05-27 07:39:27.025,5.0,
2022-05-27 07:39:27.211,,0.0
2022-05-27 07:39:27.225,3.0303030303030303,
2022-05-27 07:39:27.411,,2.564102564102564
2022-05-27 07:39:27.425,7.5,
2022-05-27 07:39:27.611,,0.0
2022-05-27 07:39:27.625,5.0,
2022-05-27 07:39:27.811,,2.5
2022-05-27 07:39:27.825,10.0,
2022-05-27 07:39:28.011,,0.0
2022-05-27 07:39:28.025,15.0,
2022-05-27 07:39:28.211,,0.0
2022-05-27 07:39:28.225,7.5,
2022-05-27 07:39:28.411,,0.0
2022-05-27 07:39:28.425,12.5,
2022-05-27 07:39:28.611,,0.0
2022-05-27 07:39:28.625,10.256410256410255,
2022-05-27 07:39:28.811,,0.0
2022-05-27 07:39:28.825,7.5,
2022-05-27 07:39:29.011,,0.0
2022-05-27 07:39:29.025,12.5,
2022-05-27 07:39:29.211,,0.0
2022-05-27 07:39:29.225,10.0,
2022-05-27 07:39:29.411,,0.0
2022-05-27 07:39:29.425,12.5,
2022-05-27 07:39:29.611,,0.0
2022-05-27 07:39:29.625,10.256410256410255,
2022-05-27 07:39:29.811,,0.0
2022-05-27 07:39:29.825,7.894736842105263,
2022-05-27 07:39:30.011,,2.564102564102564
2022-05-27 07:39:30.025,7.5,
2022-05-27 07:39:30.211,,0.0
2022-05-27 07:39:30.225,12.82051282051282,
2022-05-27 07:39:30.411,,0.0
2022-05-27 07:39:30.425,7.5,
2022-05-27 07:39:30.611,,5.0
2022-05-27 07:39:30.625,7.6923076923076925,
2022-05-27 07:39:30.811,,2.564102564102564
2022-05-27 07:39:30.825,12.5,
2022-05-27 07:39:31.011,,0.0
2022-05-27 07:39:31.025,7.5,
2022-05-27 07:39:31.211,,0.0
2022-05-27 07:39:31.225,8.333333333333332,
2022-05-27 07:39:31.411,,5.0
2022-05-27 07:39:31.425,7.5,
2022-05-27 07:39:31.611,,0.0
2022-05-27 07:39:31.625,5.0,
2022-05-27 07:39:31.811,,0.0
2022-05-27 07:39:31.825,12.5,
2022-05-27 07:39:32.011,,0.0
2022-05-27 07:39:32.025,10.0,
2022-05-27 07:39:32.211,,0.0
2022-05-27 07:39:32.225,7.5,
2022-05-27 07:39:32.411,,0.0
2022-05-27 07:39:32.425,2.631578947368421,
2022-05-27 07:39:32.611,,5.128205128205128
2022-05-27 07:39:32.625,7.6923076923076925,
2022-05-27 07:39:32.811,,2.5
2022-05-27 07:39:32.825,7.5,
2022-05-27 07:39:33.011,,0.0
2022-05-27 07:39:33.025,10.256410256410255,
2022-05-27 07:39:33.211,,0.0
2022-05-27 07:39:33.225,10.0,
2022-05-27 07:39:33.411,,2.5
2022-05-27 07:39:33.425,15.384615384615385,
2022-05-27 07:39:33.611,,7.5
2022-05-27 07:39:33.625,12.5,
2022-05-27 07:39:33.811,,0.0
2022-05-27 07:39:33.825,7.894736842105263,
2022-05-27 07:39:34.011,,0.0
2022-05-27 07:39:34.025,5.0,
2022-05-27 07:39:34.211,,0.0
2022-05-27 07:39:34.225,10.0,
2022-05-27 07:39:34.411,,0.0
2022-05-27 07:39:34.425,10.0,
2022-05-27 07:39:34.611,,5.0
2022-05-27 07:39:34.625,10.0,
2022-05-27 07:39:34.811,,7.5
2022-05-27 07:39:34.825,12.5,
2022-05-27 07:39:35.011,,0.0
2022-05-27 07:39:35.025,10.256410256410255,
2022-05-27 07:39:35.211,,0.0
2022-05-27 07:39:35.225,10.0,
2022-05-27 07:39:35.411,,2.5
2022-05-27 07:39:35.425,10.0,
2022-05-27 07:39:35.611,,0.0
2022-05-27 07:39:35.625,5.0,
2022-05-27 07:39:35.811,,2.5
2022-05-27 07:39:35.825,5.0,
2022-05-27 07:39:36.011,,2.5
2022-05-27 07:39:36.025,5.0,
2022-05-27 07:39:36.211,,0.0
2022-05-27 07:39:36.225,5.0,
2022-05-27 07:39:36.411,,0.0
2022-05-27 07:39:36.425,10.256410256410255,
2022-05-27 07:39:36.611,,2.5
2022-05-27 07:39:36.625,5.0,
2022-05-27 07:39:36.811,,0.0
2022-05-27 07:39:36.825,7.5,
2022-05-27 07:39:37.011,,2.5
2022-05-27 07:39:37.025,10.0,
2022-05-27 07:39:37.211,,2.5
2022-05-27 07:39:37.225,12.5,
2022-05-27 07:39:37.411,,2.5
2022-05-27 07:39:37.425,10.0,
2022-05-27 07:39:37.611,,0.0
2022-05-27 07:39:37.625,10.256410256410255,
2022-05-27 07:39:37.811,,0.0
2022-05-27 07:39:37.825,5.0,
2022-05-27 07:39:38.011,,2.5
2022-05-27 07:39:38.025,5.0,
2022-05-27 07:39:38.211,,2.5
2022-05-27 07:39:38.225,7.5,
2022-05-27 07:39:38.411,,5.0
2022-05-27 07:39:38.425,10.0,
2022-05-27 07:39:38.611,,2.5
2022-05-27 07:39:38.625,7.5,
2022-05-27 07:39:38.811,,0.0
2022-05-27 07:39:38.825,12.5,
2022-05-27 07:39:39.011,,2.5
2022-05-27 07:39:39.025,12.82051282051282,
2022-05-27 07:39:39.211,,0.0
2022-05-27 07:39:39.225,7.5,
2022-05-27 07:39:39.411,,2.5
2022-05-27 07:39:39.425,17.5,
2022-05-27 07:39:39.611,,0.0
2022-05-27 07:39:39.625,10.0,
2022-05-27 07:39:39.811,,0.0
2022-05-27 07:39:39.825,5.0,
2022-05-27 07:39:40.011,,2.564102564102564
2022-05-27 07:39:40.025,15.0,
2022-05-27 07:39:40.211,,0.0
2022-05-27 07:39:40.225,10.0,
2022-05-27 07:39:40.411,,2.5
2022-05-27 07:39:40.425,10.0,
2022-05-27 07:39:40.611,,0.0
2022-05-27 07:39:40.625,12.5,
2022-05-27 07:39:40.811,,0.0
2022-05-27 07:39:40.825,7.5,
2022-05-27 07:39:41.011,,2.564102564102564
2022-05-27 07:39:41.025,7.5,
2022-05-27 07:39:41.211,,2.5
2022-05-27 07:39:41.225,5.0,
2022-05-27 07:39:41.411,,0.0
2022-05-27 07:39:41.425,5.0,
2022-05-27 07:39:41.611,,0.0
2022-05-27 07:39:41.625,7.6923076923076925,
2022-05-27 07:39:41.811,,0.0
2022-05-27 07:39:41.825,10.0,
2022-05-27 07:39:42.011,,2.5
2022-05-27 07:39:42.025,7.5,
2022-05-27 07:39:42.211,,2.5
2022-05-27 07:39:42.225,10.0,
2022-05-27 07:39:42.411,,0.0
2022-05-27 07:39:42.425,7.5,
2022-05-27 07:39:42.611,,2.5
2022-05-27 07:39:42.625,7.5,
2022-05-27 07:39:42.811,,0.0
2022-05-27 07:39:42.825,14.814814814814813,
2022-05-27 07:39:43.011,,0.0
2022-05-27 07:39:43.025,15.0,
2022-05-27 07:39:43.211,,0.0
2022-05-27 07:39:43.225,5.0,
2022-05-27 07:39:43.411,,0.0
2022-05-27 07:39:43.425,0.0,
2022-05-27 07:39:43.611,,0.0
2022-05-27 07:39:43.625,7.5,
2022-05-27 07:39:43.811,,5.0
2022-05-27 07:39:43.825,10.0,
2022-05-27 07:39:44.011,,2.5
2022-05-27 07:39:44.025,7.5,
2022-05-27 07:39:44.211,,0.0
2022-05-27 07:39:44.225,7.4074074074074066,
2022-05-27 07:39:44.411,,0.0
2022-05-27 07:39:44.425,12.5,
2022-05-27 07:39:44.611,,0.0
2022-05-27 07:39:44.625,17.5,
2022-05-27 07:39:44.811,,5.0
2022-05-27 07:39:44.825,10.0,
2022-05-27 07:39:45.011,,0.0
2022-05-27 07:39:45.025,10.0,
2022-05-27 07:39:45.211,,2.5
2022-05-27 07:39:45.225,10.0,
2022-05-27 07:39:45.411,,2.5
2022-05-27 07:39:45.425,3.125,
2022-05-27 07:39:45.611,,0.0
2022-05-27 07:39:45.625,12.5,
2022-05-27 07:39:45.811,,0.0
2022-05-27 07:39:45.825,7.5,
2022-05-27 07:39:46.011,,0.0
2022-05-27 07:39:46.025,10.0,
2022-05-27 07:39:46.211,,0.0
2022-05-27 07:39:46.225,7.5,
2022-05-27 07:39:46.411,,0.0
2022-05-27 07:39:46.425,10.0,
2022-05-27 07:39:46.611,,0.0
2022-05-27 07:39:46.625,7.5,
2022-05-27 07:39:46.811,,0.0
2022-05-27 07:39:46.825,7.5,
2022-05-27 07:39:47.011,,2.5
2022-05-27 07:39:47.025,7.5,
2022-05-27 07:39:47.211,,0.0
2022-05-27 07:39:47.225,5.0,
2022-05-27 07:39:47.411,,0.0
2022-05-27 07:39:47.425,5.0,
2022-05-27 07:39:47.611,,0.0
2022-05-27 07:39:47.625,10.0,
2022-05-27 07:39:47.811,,2.5
2022-05-27 07:39:47.825,12.5,
2022-05-27 07:39:48.011,,0.0
2022-05-27 07:39:48.025,15.0,
2022-05-27 07:39:48.211,,0.0
2022-05-27 07:39:48.225,10.0,
2022-05-27 07:39:48.411,,0.0
2022-05-27 07:39:48.425,7.5,
2022-05-27 07:39:48.611,,0.0
2022-05-27 07:39:48.625,12.5,
2022-05-27 07:39:48.811,,0.0
2022-05-27 07:39:48.825,7.5,
2022-05-27 07:39:49.011,,0.0
2022-05-27 07:39:49.025,12.5,
2022-05-27 07:39:49.211,,2.5
2022-05-27 07:39:49.225,2.5,
2022-05-27 07:39:49.411,,0.0
2022-05-27 07:39:49.425,10.0,
2022-05-27 07:39:49.611,,0.0
2022-05-27 07:39:49.625,7.5,
2022-05-27 07:39:49.811,,2.5
2022-05-27 07:39:49.825,7.5,
2022-05-27 07:39:50.011,,0.0
2022-05-27 07:39:50.025,12.5,
2022-05-27 07:39:50.211,,0.0
2022-05-27 07:39:50.225,10.0,
2022-05-27 07:39:50.411,,2.5
2022-05-27 07:39:50.425,15.0,
2022-05-27 07:39:50.611,,0.0
2022-05-27 07:39:50.625,10.0,
2022-05-27 07:39:50.811,,0.0
2022-05-27 07:39:50.825,12.5,
2022-05-27 07:39:51.011,,0.0
2022-05-27 07:39:51.025,2.5,
2022-05-27 07:39:51.211,,0.0
2022-05-27 07:39:51.225,10.0,
2022-05-27 07:39:51.411,,0.0
2022-05-27 07:39:51.425,10.0,
2022-05-27 07:39:51.611,,0.0
2022-05-27 07:39:51.625,15.0,
2022-05-27 07:39:51.811,,0.0
2022-05-27 07:39:51.825,5.0,
2022-05-27 07:39:52.011,,0.0
2022-05-27 07:39:52.025,5.263157894736842,
2022-05-27 07:39:52.211,,0.0
2022-05-27 07:39:52.225,7.5,
2022-05-27 07:39:52.411,,0.0
2022-05-27 07:39:52.425,10.0,
2022-05-27 07:39:52.611,,0.0
2022-05-27 07:39:52.625,5.0,
2022-05-27 07:39:52.811,,0.0
2022-05-27 07:39:52.825,10.0,
2022-05-27 07:39:53.011,,5.0
2022-05-27 07:39:53.025,7.5,
2022-05-27 07:39:53.211,,0.0
2022-05-27 07:39:53.225,10.0,
2022-05-27 07:39:53.411,,0.0
2022-05-27 07:39:53.425,12.5,
2022-05-27 07:39:53.611,,0.0
2022-05-27 07:39:53.625,10.0,
2022-05-27 07:39:53.811,,0.0
2022-05-27 07:39:53.825,7.5,
2022-05-27 07:39:54.011,,0.0
2022-05-27 07:39:54.025,10.0,
2022-05-27 07:39:54.211,,2.5
2022-05-27 07:39:54.225,7.5,
2022-05-27 07:39:54.411,,0.0
2022-05-27 07:39:54.425,15.0,
2022-05-27 07:39:54.611,,0.0
2022-05-27 07:39:54.625,10.526315789473683,
2022-05-27 07:39:54.811,,0.0
2022-05-27 07:39:54.825,2.564102564102564,
2022-05-27 07:39:55.011,,0.0
2022-05-27 07:39:55.025,5.0,
2022-05-27 07:39:55.211,,0.0
2022-05-27 07:39:55.225,12.5,
2022-05-27 07:39:55.411,,0.0
2022-05-27 07:39:55.425,5.0,
2022-05-27 07:39:55.611,,0.0
2022-05-27 07:39:55.625,15.0,
2022-05-27 07:39:55.811,,5.0
2022-05-27 07:39:55.825,2.564102564102564,
2022-05-27 07:39:56.011,,0.0
2022-05-27 07:39:56.025,12.5,
2022-05-27 07:39:56.211,,0.0
2022-05-27 07:39:56.225,7.5,
2022-05-27 07:39:56.411,,2.5
2022-05-27 07:39:56.425,7.5,
2022-05-27 07:39:56.611,,2.5
2022-05-27 07:39:56.625,7.5,
2022-05-27 07:39:56.811,,0.0
2022-05-27 07:39:56.825,7.5,
2022-05-27 07:39:57.011,,2.5
2022-05-27 07:39:57.025,10.0,
2022-05-27 07:39:57.211,,0.0
2022-05-27 07:39:57.225,7.5,
2022-05-27 07:39:57.411,,2.5
2022-05-27 07:39:57.425,12.5,
2022-05-27 07:39:57.611,,0.0
2022-05-27 07:39:57.625,5.0,
2022-05-27 07:39:57.811,,2.5
2022-05-27 07:39:57.825,7.5,
2022-05-27 07:39:58.011,,0.0
2022-05-27 07:39:58.025,7.5,
2022-05-27 07:39:58.211,,0.0
2022-05-27 07:39:58.225,12.5,
2022-05-27 07:39:58.411,,0.0
2022-05-27 07:39:58.425,7.5,
2022-05-27 07:39:58.611,,0.0
2022-05-27 07:39:58.625,10.0,
2022-05-27 07:39:58.811,,0.0
2022-05-27 07:39:58.825,10.0,
2022-05-27 07:39:59.011,,0.0
2022-05-27 07:39:59.025,7.5,
2022-05-27 07:39:59.211,,0.0
2022-05-27 07:39:59.225,5.0,
2022-05-27 07:39:59.411,,0.0
2022-05-27 07:39:59.425,7.5,
2022-05-27 07:39:59.611,,0.0
2022-05-27 07:39:59.625,7.5,
2022-05-27 07:39:59.811,,0.0
2022-05-27 07:39:59.825,7.5,
2022-05-27 07:40:00.011,,0.0
2022-05-27 07:40:00.025,12.5,
2022-05-27 07:40:00.211,,0.0
2022-05-27 07:40:00.225,15.0,
2022-05-27 07:40:00.411,,0.0
2022-05-27 07:40:00.425,12.5,
2022-05-27 07:40:00.611,,2.5
2022-05-27 07:40:00.625,7.5,
2022-05-27 07:40:00.811,,0.0
2022-05-27 07:40:00.825,12.5,
2022-05-27 07:40:01.011,,0.0
2022-05-27 07:40:01.025,10.256410256410255,
2022-05-27 07:40:01.211,,0.0
2022-05-27 07:40:01.225,12.5,
2022-05-27 07:40:01.411,,0.0
2022-05-27 07:40:01.425,7.5,
2022-05-27 07:40:01.611,,0.0
2022-05-27 07:40:01.625,12.5,
2022-05-27 07:40:01.811,,0.0
2022-05-27 07:40:01.825,12.5,
2022-05-27 07:40:02.011,,0.0
2022-05-27 07:40:02.025,7.5,
2022-05-27 07:40:02.211,,0.0
2022-05-27 07:40:02.225,7.5,
2022-05-27 07:40:02.411,,0.0
2022-05-27 07:40:02.425,7.5,
2022-05-27 07:40:02.611,,0.0
2022-05-27 07:40:02.625,10.0,
2022-05-27 07:40:02.811,,0.0
2022-05-27 07:40:02.825,12.5,
2022-05-27 07:40:03.011,,0.0
2022-05-27 07:40:03.025,12.5,
2022-05-27 07:40:03.211,,0.0
2022-05-27 07:40:03.225,7.5,
2022-05-27 07:40:03.411,,2.5
2022-05-27 07:40:03.425,12.5,
2022-05-27 07:40:03.611,,0.0
2022-05-27 07:40:03.625,7.6923076923076925,
2022-05-27 07:40:03.811,,2.5
2022-05-27 07:40:03.825,10.0,
2022-05-27 07:40:04.011,,0.0
2022-05-27 07:40:04.025,5.0,
2022-05-27 07:40:04.211,,0.0
2022-05-27 07:40:04.225,7.5,
2022-05-27 07:40:04.411,,0.0
2022-05-27 07:40:04.425,15.0,
2022-05-27 07:40:04.611,,0.0
2022-05-27 07:40:04.625,5.0,
2022-05-27 07:40:04.811,,0.0
2022-05-27 07:40:04.825,12.5,
2022-05-27 07:40:05.011,,0.0
2022-05-27 07:40:05.025,10.256410256410255,
2022-05-27 07:40:05.211,,0.0
2022-05-27 07:40:05.225,10.0,
2022-05-27 07:40:05.411,,0.0
2022-05-27 07:40:05.425,12.5,
2022-05-27 07:40:05.611,,0.0
2022-05-27 07:40:05.625,2.5,
2022-05-27 07:40:05.811,,0.0
2022-05-27 07:40:05.825,7.5,
2022-05-27 07:40:06.011,,0.0
2022-05-27 07:40:06.025,10.0,
2022-05-27 07:40:06.211,,0.0
2022-05-27 07:40:06.225,5.0,
2022-05-27 07:40:06.411,,0.0
2022-05-27 07:40:06.425,7.5,
2022-05-27 07:40:06.611,,2.5
2022-05-27 07:40:06.625,5.0,
2022-05-27 07:40:06.811,,0.0
2022-05-27 07:40:06.825,5.0,
2022-05-27 07:40:07.011,,0.0
2022-05-27 07:40:07.025,2.5,
2022-05-27 07:40:07.225,20.0,
2022-05-27 07:40:07.411,,0.0
2022-05-27 07:40:07.425,15.0,
2022-05-27 07:40:07.611,,0.0
2022-05-27 07:40:07.625,15.0,
2022-05-27 07:40:07.825,0.0,
2022-05-27 07:40:08.225,0.0,
2022-05-27 07:40:08.425,0.0,
2022-05-27 07:40:08.611,,0.0
2022-05-27 07:40:08.825,0.0,
2022-05-27 07:40:09.011,,0.0
2022-05-27 07:40:09.625,0.0,
2022-05-27 07:40:10.225,0.0,

Below is the Scatter plot with same data source

Well, for starters, half your data is NaNs:

In [8]: sum(np.isnan(df.D2)) / len(df.D2)
Out[8]: 0.500772797527048

In [9]: sum(np.isnan(df.D1)) / len(df.D1)
Out[9]: 0.4992272024729521

Whenever there a NaN in line data, that causes two line segments to be deleted (one on either side of the NaN since any segment with a NaN anywhere is un-drawable). Depending on the distribution of NaNs, that could easily cause nearly all the line segments to be deleted, e.g. if there were NaNs at least every third row for a stretch.

I would suggest experimenting with the data, either dropping NaN rows, or replacing the NaNs with some numerical value and see if that causes “all” the data to show up. If so, you will have to figure out / decide what you want to happen with NaNs. (There is not a “right” answer about what to do, only a “right for you” answer, depending on your requirements.)