File: cross_validation.py

package info (click to toggle)
sklearn-pandas 2.2.0-5
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 440 kB
  • sloc: python: 1,177; sh: 12; makefile: 8
file content (10 lines) | stat: -rw-r--r-- 195 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
class DataWrapper(object):

    def __init__(self, df):
        self.df = df

    def __len__(self):
        return len(self.df)

    def __getitem__(self, key):
        return self.df.iloc[key]