code: def test_pandas_dataframe(from_pandas):
      df = pd.DataFrame(
          {"x": [1, 2, 3]},
          index=pd.date_range(start="2020", periods=3, freq="H"),
      )
  
      tf = zb.TimeFrame.from_pandas(df)
      assert np.array_equal(
          tf.index.data.astype(int), df.index.to_period().asi8
      )
      assert np.array_equal(tf["x"], df["x"])
  
      df = df.reindex(
          pd.period_range(start="2020", periods=3, freq="H")
      )
      tf = zb.TimeFrame.from_pandas(df)
      assert np.array_equal(tf.index.data.astype(int), df.index.asi8)
  
      df = df.reindex(np.arange(len(df)))
      tf = zb.TimeFrame.from_pandas(df)
      assert tf.index is None
  
imports: import pytest
  import numpy
  import pandas
  from pandas.tseries.frequencies import to_offset
  import gluonts.zebras
label_desc: Use image node_id 2 for calling a global function with example usage: test_pandas_dataframe(from_pandas) without return types