code: def test_resample_timeseries_dataframe_ms(self):
      data = {
          "data": [1, 2, 3],
          "datetime": [
              "2020-11-09T07:52:00.007",
              "2020-11-09T07:52:00.008",
              "2020-11-09T07:52:00.010",
          ],
      }
      df = pd.DataFrame(data)
      df["datetime"] = pd.to_datetime(df["datetime"])
      res_df = resample_timeseries_dataframe(
          df,
          dt_col="datetime",
          interval="2ms",
          start_time="2020-11-09T07:52:00.005",
          end_time="2020-11-09T07:52:00.010",
          merge_mode="max",
      )
      assert len(res_df) == 4 and res_df["data"].isna().sum() == 1
      res_df = resample_timeseries_dataframe(
          df,
          dt_col="datetime",
          interval="2ms",
          start_time="2020-11-09T07:52:00.006",
          end_time="2020-11-09T07:52:00.010",
          merge_mode="max",
      )
      assert len(res_df) == 3 and res_df["data"].isna().sum() == 0
      res_df = resample_timeseries_dataframe(
          df,
          dt_col="datetime",
          interval="2ms",
          start_time="2020-11-09T07:52:00.007",
          end_time="2020-11-09T07:52:00.010",
          merge_mode="max",
      )
      assert len(res_df) == 3 and res_df["data"].isna().sum() == 0
      res_df = resample_timeseries_dataframe(
          df, dt_col="datetime", interval="2ms", merge_mode="max"
      )
      assert len(res_df) == 3 and res_df["data"].isna().sum() == 0
  
file_path: analytics-zoo/pyzoo/test/zoo/chronos/data/utils/test_resample.py
imports: import pytest
  import pandas
  import numpy
  from test.zoo.pipeline.utils.test_utils import ZooTestCase
  from zoo.chronos.data.utils.resample import resample_timeseries_dataframe
label_desc: Use image node_id 5 for calling the TestResampleTimeSeries obj's underlying member method code with example usage: obj.test_resample_timeseries_dataframe_ms() without return types