Commit 5b6747f
fix(waterdata): Force float64 dtype on physical-measurement columns
``pd.to_numeric`` infers ``int64`` when every value in a column is
integer-shaped — common in the USGS API response for small streams
whose daily discharge happens to be whole-CFS for the queried period.
Callers expect ``value``/``altitude``/``drainage_area``/depths to be
float because they're continuous quantities; integer dtype causes
surprise downstream (integer-division arithmetic, dtype upcast when
concatenated with a sibling query whose values are fractional).
Append ``.astype("float64")`` after the numeric coercion.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 3910b7c commit 5b6747f
2 files changed
Lines changed: 31 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1169 | 1169 | | |
1170 | 1170 | | |
1171 | 1171 | | |
1172 | | - | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
1173 | 1181 | | |
1174 | 1182 | | |
1175 | 1183 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
490 | 491 | | |
491 | 492 | | |
492 | 493 | | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
493 | 515 | | |
494 | 516 | | |
495 | 517 | | |
| |||
0 commit comments