Commit 583026b
authored
ENH: Add support for reading value labels from 108-format and prior Stata dta files (#58155)
* ENH: Add support for reading value labels from 108-format and prior Stata dta files
* Add type hints for value label dictionary
* Apply changes suggested by pylint
* Clarify that only the 108 format has both 8 character (plus null terminator) label names and uses the newer value label layout
* Split function for reading value labels into newer and older format versions
* Remove duplicate line
* Update type hints for value label dictionary keys to match read content
* Indicate versions each value label helper function applies to via docstrings
* Seek to value table location within version specific helper functions
* Wait until value labels are read before setting flag
* Move value label dictionary initialisation to class __init__1 parent 1e9053d commit 583026b
File tree
6 files changed
+95
-20
lines changed- doc/source/whatsnew
- pandas
- io
- tests/io
- data/stata
6 files changed
+95
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1122 | 1122 | | |
1123 | 1123 | | |
1124 | 1124 | | |
| 1125 | + | |
1125 | 1126 | | |
1126 | 1127 | | |
1127 | 1128 | | |
| |||
1502 | 1503 | | |
1503 | 1504 | | |
1504 | 1505 | | |
1505 | | - | |
1506 | | - | |
1507 | | - | |
1508 | | - | |
1509 | | - | |
1510 | | - | |
1511 | | - | |
1512 | | - | |
1513 | | - | |
1514 | | - | |
1515 | | - | |
| 1506 | + | |
| 1507 | + | |
1516 | 1508 | | |
1517 | 1509 | | |
1518 | 1510 | | |
1519 | 1511 | | |
1520 | 1512 | | |
1521 | 1513 | | |
1522 | 1514 | | |
1523 | | - | |
1524 | | - | |
1525 | | - | |
1526 | 1515 | | |
1527 | 1516 | | |
1528 | 1517 | | |
1529 | 1518 | | |
1530 | 1519 | | |
1531 | 1520 | | |
1532 | 1521 | | |
1533 | | - | |
1534 | | - | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
1535 | 1526 | | |
1536 | 1527 | | |
1537 | 1528 | | |
| |||
1555 | 1546 | | |
1556 | 1547 | | |
1557 | 1548 | | |
| 1549 | + | |
1558 | 1550 | | |
1559 | 1551 | | |
| 1552 | + | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
1560 | 1588 | | |
1561 | 1589 | | |
1562 | 1590 | | |
| |||
1729 | 1757 | | |
1730 | 1758 | | |
1731 | 1759 | | |
1732 | | - | |
| 1760 | + | |
1733 | 1761 | | |
1734 | 1762 | | |
1735 | 1763 | | |
| |||
1845 | 1873 | | |
1846 | 1874 | | |
1847 | 1875 | | |
1848 | | - | |
| 1876 | + | |
1849 | 1877 | | |
1850 | 1878 | | |
1851 | 1879 | | |
| |||
1983 | 2011 | | |
1984 | 2012 | | |
1985 | 2013 | | |
1986 | | - | |
| 2014 | + | |
1987 | 2015 | | |
1988 | 2016 | | |
1989 | 2017 | | |
| |||
Binary file not shown.
Binary file not shown.
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
| 228 | + | |
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
273 | 319 | | |
274 | 320 | | |
275 | 321 | | |
| |||
0 commit comments