code: def test_loc_timestamp_str(self):
      pdf = pd.DataFrame(
          {"A": np.random.randn(100), "B": np.random.randn(100)},
          index=pd.date_range("2011-01-01", freq="H", periods=100),
      )
      psdf = ps.from_pandas(pdf)
  
      # partial string slice
      # TODO?: self.assert_eq(pdf.loc['2011-01-02'],
      # TODO?:                psdf.loc['2011-01-02'])
      self.assert_eq(
          pdf.loc["2011-01-02":"2011-01-05"],
          psdf.loc["2011-01-02":"2011-01-05"],
      )
  
      # series
      # TODO?: self.assert_eq(pdf.A.loc['2011-01-02'],
      # TODO?:                psdf.A.loc['2011-01-02'])
      self.assert_eq(
          pdf.A.loc["2011-01-02":"2011-01-05"],
          psdf.A.loc["2011-01-02":"2011-01-05"],
      )
  
      pdf = pd.DataFrame(
          {"A": np.random.randn(100), "B": np.random.randn(100)},
          index=pd.date_range("2011-01-01", freq="M", periods=100),
      )
      psdf = ps.from_pandas(pdf)
      # TODO?: self.assert_eq(pdf.loc['2011-01'], psdf.loc['2011-01'])
      # TODO?: self.assert_eq(pdf.loc['2011'], psdf.loc['2011'])
  
      self.assert_eq(
          pdf.loc["2011-01":"2012-05"], psdf.loc["2011-01":"2012-05"]
      )
      self.assert_eq(pdf.loc["2011":"2015"], psdf.loc["2011":"2015"])
  
      # series
      # TODO?: self.assert_eq(pdf.B.loc['2011-01'], psdf.B.loc['2011-01'])
      # TODO?: self.assert_eq(pdf.B.loc['2011'], psdf.B.loc['2011'])
  
      self.assert_eq(
          pdf.B.loc["2011-01":"2012-05"],
          psdf.B.loc["2011-01":"2012-05"],
      )
      self.assert_eq(
          pdf.B.loc["2011":"2015"], psdf.B.loc["2011":"2015"]
      )
  
imports: import unittest
  import numpy
  import pandas
  from pyspark import pandas
  from pyspark.testing.pandasutils import PandasOnSparkTestCase
  from pyspark.testing.sqlutils import SQLTestUtils
label_desc: Use image node_id 13 for calling the IndexingLocMixin obj's underlying member method code with example usage: obj.test_loc_timestamp_str() without return types