def test_getitem_preserve_name(self):
        result = self.ts[self.ts > 0]
        self.assertEqual(result.name, self.ts.name)

        result = self.ts[[0, 2, 4]]
        self.assertEqual(result.name, self.ts.name)

        result = self.ts[5:10]
        self.assertEqual(result.name, self.ts.name)
dataset/ETHPy150Open pydata/pandas/pandas/tests/series/test_misc_api.py/SharedWithSparse.test_getitem_preserve_name/original