()
| 1193 | |
| 1194 | |
| 1195 | def test_parse_dates_multi_column(): |
| 1196 | pdmc_text = normalize_text( |
| 1197 | """ |
| 1198 | ID,date,time |
| 1199 | 10,2003-11-04,180036 |
| 1200 | 11,2003-11-05,125640 |
| 1201 | 12,2003-11-01,2519 |
| 1202 | 13,2003-10-22,142559 |
| 1203 | 14,2003-10-24,163113 |
| 1204 | 15,2003-10-20,170133 |
| 1205 | 16,2003-11-11,160448 |
| 1206 | 17,2003-11-03,171759 |
| 1207 | 18,2003-11-07,190928 |
| 1208 | 19,2003-10-21,84623 |
| 1209 | 20,2003-10-25,192207 |
| 1210 | 21,2003-11-13,180156 |
| 1211 | 22,2003-11-15,131037 |
| 1212 | """ |
| 1213 | ) |
| 1214 | |
| 1215 | ctx = contextlib.nullcontext() |
| 1216 | if PANDAS_GE_300: |
| 1217 | # Removed in pandas=3.0 |
| 1218 | ctx = pytest.raises(TypeError, match="list indices") |
| 1219 | elif PANDAS_GE_220: |
| 1220 | # Deprecated in pandas=2.2.0 |
| 1221 | ctx = pytest.warns(FutureWarning, match="nested") |
| 1222 | |
| 1223 | with ctx: |
| 1224 | with filetext(pdmc_text) as fn: |
| 1225 | ddf = dd.read_csv(fn, parse_dates=[["date", "time"]]) |
| 1226 | df = pd.read_csv(fn, parse_dates=[["date", "time"]]) |
| 1227 | |
| 1228 | assert (df.columns == ddf.columns).all() |
| 1229 | assert len(df) == len(ddf) |
| 1230 | |
| 1231 | |
| 1232 | def test_read_csv_sep(): |
nothing calls this directly
no test coverage detected