Exemplo n.º 1
0
 def test_impl():
     return pd_read_csv(
         "csv_data1.csv",
         names=['C'],
         dtype={'C': np.float},
         usecols=[2],
     )
Exemplo n.º 2
0
 def test_impl():
     ct_dtype = CategoricalDtype(['A', 'B', 'C', 'D'])
     df = pd_read_csv("csv_data_cat1.csv",
                      names=['C1', 'C2', 'C3'],
                      dtype={'C1': np.int, 'C2': ct_dtype, 'C3': str},
                      )
     return df
Exemplo n.º 3
0
 def test_impl():
     df = pd_read_csv(
         "csv_data_dtype1.csv",
         names=['C1', 'C2'],
         dtype=np.float64,
     )
     return df
Exemplo n.º 4
0
 def test_impl():
     dtype = {'A': 'int', 'B': 'float64', 'C': 'float', 'D': 'str'}
     return pd_read_csv(
         "csv_data1.csv",
         names=dtype.keys(),
         dtype=dtype,
     )
Exemplo n.º 5
0
 def test_impl():
     dtype = {'A': np.int, 'B': np.float, 'C': np.float, 'D': str}
     return pd_read_csv(
         "csv_data1.csv",
         names=dtype.keys(),
         dtype=dtype,
     )
Exemplo n.º 6
0
 def test_impl():
     return pd_read_csv("csv_data_date1.csv",
                        names=['A', 'B', 'C', 'D'],
                        dtype={
                            'A': np.int,
                            'B': np.float,
                            'C': str,
                            'D': np.int
                        })
Exemplo n.º 7
0
 def test_impl():
     # names = ['C1', 'C2', 'C3']
     ct_dtype = CategoricalDtype(['A', 'B', 'C'])
     dtypes = {'C1': np.int, 'C2': ct_dtype, 'C3': str}
     df = pd_read_csv("csv_data_cat1.csv",
         # names=names,  # Error: names should be constant list
         names=['C1', 'C2', 'C3'],
         dtype=dtypes
     )
     return df.C2
Exemplo n.º 8
0
 def test_impl():
     df = pd_read_csv("csv_data1.csv",
                      names=['A', 'B', 'C', 'D'],
                      dtype={
                          'A': np.int,
                          'B': np.float,
                          'C': np.float,
                          'D': str
                      })
     return (df.A.sum(), df.B.sum(), df.C.sum())
Exemplo n.º 9
0
 def test_impl():
     df = pd_read_csv("csv_data_date1.csv",
                      names=['A', 'B', 'C', 'D'],
                      dtype={
                          'A': np.int,
                          'B': np.float,
                          'C': str,
                          'D': np.int
                      })
     return (df.A.sum(), df.B.sum(), (df.C == '1966-11-13').sum(),
             df.D.sum())
Exemplo n.º 10
0
 def test_impl():
     df = pd_read_csv(
         "csv_data1.csv",
         names=['A', 'B', 'C', 'D'],
         dtype={
             'A': np.int,
             'B': np.float,
             'C': np.float,
             'D': str
         },
     )
     return df.B.values
Exemplo n.º 11
0
 def test_impl():
     return pd_read_csv(
         "csv_data1.csv",
         names=['A', 'B', 'C', 'D'],
         dtype={
             'A': np.int,
             'B': np.float,
             'C': np.float,
             'D': str
         },
         skiprows=2,
     )
Exemplo n.º 12
0
 def test_impl():
     df = pd_read_csv("csv_data_infer1.csv", skiprows=2,
                      names=['A', 'B', 'C', 'D'])
     return df.A.sum(), df.B.sum(), df.C.sum()
Exemplo n.º 13
0
 def test_impl():
     return pd_read_csv("csv_data_infer1.csv", skiprows=2)
Exemplo n.º 14
0
 def test_impl():
     df = pd_read_csv("csv_data_infer1.csv")
     return df.A.sum(), df.B.sum(), df.C.sum()
Exemplo n.º 15
0
 def test_impl():
     return pd_read_csv("csv_data_infer1.csv")