()
| 1177 | |
| 1178 | |
| 1179 | def test_parse_dates_multi_column(): |
| 1180 | pdmc_text = normalize_text(""" |
| 1181 | ID,date,time |
| 1182 | 10,2003-11-04,180036 |
| 1183 | 11,2003-11-05,125640 |
| 1184 | 12,2003-11-01,2519 |
| 1185 | 13,2003-10-22,142559 |
| 1186 | 14,2003-10-24,163113 |
| 1187 | 15,2003-10-20,170133 |
| 1188 | 16,2003-11-11,160448 |
| 1189 | 17,2003-11-03,171759 |
| 1190 | 18,2003-11-07,190928 |
| 1191 | 19,2003-10-21,84623 |
| 1192 | 20,2003-10-25,192207 |
| 1193 | 21,2003-11-13,180156 |
| 1194 | 22,2003-11-15,131037 |
| 1195 | """) |
| 1196 | |
| 1197 | ctx = contextlib.nullcontext() |
| 1198 | if PANDAS_GE_300: |
| 1199 | # Removed in pandas=3.0 |
| 1200 | ctx = pytest.raises(TypeError, match="list indices") |
| 1201 | elif PANDAS_GE_220: |
| 1202 | # Deprecated in pandas=2.2.0 |
| 1203 | ctx = pytest.warns(FutureWarning, match="nested") |
| 1204 | |
| 1205 | with ctx: |
| 1206 | with filetext(pdmc_text) as fn: |
| 1207 | ddf = dd.read_csv(fn, parse_dates=[["date", "time"]]) |
| 1208 | df = pd.read_csv(fn, parse_dates=[["date", "time"]]) |
| 1209 | |
| 1210 | assert (df.columns == ddf.columns).all() |
| 1211 | assert len(df) == len(ddf) |
| 1212 | |
| 1213 | |
| 1214 | def test_read_csv_sep(): |
nothing calls this directly
no test coverage detected