Skip to content

check parser_dates names in columns #31815

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 251 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
251 commits
Select commit Hold shift + click to select a range
24d1657
REF: Remove CategoricalIndex.get_value (#31765)
jbrockmendel Feb 9, 2020
79ca148
CLN: tests.indexing.common (#31812)
jbrockmendel Feb 9, 2020
c988567
REF: tighten what we accept in TimedeltaIndex._simple_new (#31315)
jbrockmendel Feb 9, 2020
61034b4
CLN: misplaced TimedeltaIndex tests (#31755)
jbrockmendel Feb 9, 2020
46a77f6
TST: parametrize some indexing tests (#31767)
jbrockmendel Feb 9, 2020
74dad82
BUG: iloc setitem with 3d indexer not raising (#31813)
jbrockmendel Feb 9, 2020
f7e2b74
BUG: Series[dim3array] failing to raise ValueError for some Index sub…
jbrockmendel Feb 9, 2020
7d1f825
REF: share code for set-like ops in DTI/TDI/PI (#31335)
jbrockmendel Feb 9, 2020
08bdf31
REF: share _partial_date_slice between PeriodIndex/DatetimeIndex (#31…
jbrockmendel Feb 9, 2020
c389222
REF: turn _try_mi into MultiIndex._get_values_for_loc (#31736)
jbrockmendel Feb 9, 2020
a8817ba
REF/TST: misplaced tests in tests.indexes.period (#31758)
jbrockmendel Feb 9, 2020
0a52507
REF: remove iloc case from _convert_slice_indexer (#31786)
jbrockmendel Feb 9, 2020
04e9a78
DEPR: indexing Series with single-entry list (#31333)
jbrockmendel Feb 9, 2020
ccc6923
DOC: Fix style guide typos (#31822)
dsaxton Feb 9, 2020
341a719
BUG: Too aggressive typing in NDFrame.align (#31788)
topper-123 Feb 9, 2020
c3a9ea3
correct the redirections (#31820)
rushabh-v Feb 9, 2020
0aad719
DOC: Removed numeric_only parameter from pd.DataFrame.mad docs (#31641)
r0cketr1kky Feb 9, 2020
a76cfbf
DOC: '10 minutes to pandas' - <TAB> completion section now show a con…
Cardosaum Feb 9, 2020
b30d7d4
CLN: remove kwargs from signature of (Index|MultiIndex).copy (#31669)
topper-123 Feb 9, 2020
8cfcf65
REF: use public indexers in groupby.ops (#31814)
jbrockmendel Feb 9, 2020
f04d913
fixed mypy errors in mypy-pandas.tests.extension.decimal.test_decimal…
SaturnFromTitan Feb 9, 2020
980ab6b
Test messages test period (#31824)
raisadz Feb 9, 2020
b42505e
REF: simplify PeriodIndex.get_loc (#31598)
jbrockmendel Feb 9, 2020
c5fb994
CLN: trim unreachable indexing code (#31768)
jbrockmendel Feb 9, 2020
c4e8eb3
Fix bug in calculation of holidays (#31416)
dhirschfeld Feb 9, 2020
a96bdbd
BUG Decode to UTF-8 the dtype string read from a hdf file (#31756)
pedroreys Feb 9, 2020
d2a14ac
fixed mypy errors in pandas.tests.extension.json.test_json (#31836)
SaturnFromTitan Feb 9, 2020
11f1500
ENH: Allow multi values for index and columns in df.pivot (#30928)
charlesdong1991 Feb 9, 2020
bf4e74d
CLN: Use self.loc for Series __getitem__ with IntervalIndex (#31830)
jbrockmendel Feb 9, 2020
39e9b35
Don't use caps (#31829)
dsaxton Feb 9, 2020
d7996b9
CLN: disallow kind=None in _convert_slice_indexer (#31832)
jbrockmendel Feb 9, 2020
81669e3
Test messages test integer (#31831)
raisadz Feb 9, 2020
625441b
REF: move loc-only validate_read_indexer to Loc (#31834)
jbrockmendel Feb 9, 2020
4ab7bb4
DOC: Fixed example section in pandas/core/dtypes/*.py (#31451)
ShaharNaveh Feb 10, 2020
6bc2dca
CLN: assorted indexing-related cleanups (#31797)
jbrockmendel Feb 10, 2020
fcf7258
BUG: Fix raw parameter not being respected in groupby.rolling.apply (…
mroeschke Feb 10, 2020
f27d70f
REF: implement ExtensionIndex._concat_same_dtype, use for IntervalInd…
jbrockmendel Feb 10, 2020
292a993
Docstring fixes for PR06 errors (#31838)
jchen2186 Feb 10, 2020
8dd9fab
BUG: Fix rolling.corr with time frequency (#31841)
mroeschke Feb 10, 2020
8680ddd
REF: make _setitem_with_indexer iloc-only (#31837)
jbrockmendel Feb 10, 2020
66440b2
DOC: Specify use of google cloud storage for CSVs (#31860)
iamshwin Feb 11, 2020
d494717
REF: Use nonzero in place of argwhere (#31853)
bashtage Feb 11, 2020
3060972
REF: make Series/DataFrame _slice always positional (#31854)
jbrockmendel Feb 11, 2020
4181042
DOC: Update documentation DataFrame.nsmallest (#31833)
Pearcekieser Feb 11, 2020
9d66896
CLN: f-string formatting (#31868)
monicaw218 Feb 11, 2020
50ebb24
CLN: tests.generic (#31865)
jbrockmendel Feb 11, 2020
ba59f6a
fix lint issue.
sathyz Feb 11, 2020
7509aed
PLT: Color attributes of medianprops etc are lost in df.boxplot and d…
charlesdong1991 Feb 11, 2020
4a1fbad
CLN: D300 Use """triple double quotes""" (#31888)
simonjayhawkins Feb 11, 2020
02887a5
CLN: D201 No blank lines allowed before function docstring (#31889)
simonjayhawkins Feb 11, 2020
1117328
CLN: D208 Docstring is over-indented (#31890)
simonjayhawkins Feb 11, 2020
1b45d90
CLN: D204 1 blank line required after class docstring (#31892)
simonjayhawkins Feb 11, 2020
bec7378
ENH: Support multi row inserts in to_sql when using the sqlite fallba…
simongibbons Feb 11, 2020
f1c5cb0
D209 Multi-line docstring closing quotes should be on a separate line…
simonjayhawkins Feb 11, 2020
f49907f
TST: parametrize eval tests (#31901)
jbrockmendel Feb 12, 2020
1e6cf96
DOC: Added documentation for ImportError's (#30912)
gonemad97 Feb 12, 2020
35174ae
TYP: partial typing of masked array (#31728)
simonjayhawkins Feb 12, 2020
415e43b
DOC: Fix divmod return values (#31894)
naterarmstrong Feb 12, 2020
634a41f
CLN: remove odious kludge (#31907)
jbrockmendel Feb 12, 2020
16684f2
BUG: Avoid casting Int to object in Categorical.from_codes (#31794)
dsaxton Feb 12, 2020
361a938
BUG: fix StringArray/PandasArray setitem with slice (#31773)
jorisvandenbossche Feb 12, 2020
9767da6
BUG: fix parquet roundtrip with unsigned integer dtypes (#31918)
jorisvandenbossche Feb 12, 2020
2154ad3
BUG: fix infer_dtype for StringDtype (#31877)
jorisvandenbossche Feb 12, 2020
dd03c19
TYP: pandas/core/dtypes/base.py (#31352)
simonjayhawkins Feb 12, 2020
012a6a3
BLD: Run flake8 check on Cython files in pre-commit (#30847)
xhochy Feb 12, 2020
143b011
CLN: Replace Appender and Substitution with simpler doc decorator (#3…
HH-MWB Feb 12, 2020
c2f3ce3
BUG: MultiIndex intersection with sort=False does not preserve order…
Feb 12, 2020
bc6ab05
CLN: Some code cleanups (#31792)
ShaharNaveh Feb 12, 2020
97054ac
D202 No blank lines allowed after function docstring (#31895)
simonjayhawkins Feb 12, 2020
a4d743e
ENH: support datetime64, datetime64tz in nanops.mean, nanops.median (…
jbrockmendel Feb 12, 2020
ee8b856
CLN: 29547 replace old string formatting 1 (#31914)
3vts Feb 12, 2020
48cb5a9
CLN: implement _getitem_tuple_same_dim (#31911)
jbrockmendel Feb 12, 2020
8a7fbbe
TST: parametrize generic/internals tests (#31900)
jbrockmendel Feb 12, 2020
50dad9c
CLN: 29547 replace old string formatting 2 (#31933)
3vts Feb 13, 2020
56cc7f4
BUG: Handle NA in assert_numpy_array_equal (#31910)
dsaxton Feb 13, 2020
4ac1e5f
CLN: assorted cleanups (#31938)
jbrockmendel Feb 13, 2020
95b0e14
TST: expand tests for ExtensionArray setitem with nullable arrays (#3…
jorisvandenbossche Feb 13, 2020
e8eb49d
remove blocking return (#31960)
MarcoGorelli Feb 13, 2020
bcfc608
D412: No blank lines allowed between a section header and its content…
simonjayhawkins Feb 13, 2020
c67407d
D409: Section underline should match the length of its name (#31958)
simonjayhawkins Feb 13, 2020
c8f32cb
D411: Missing blank line before section (#31959)
simonjayhawkins Feb 13, 2020
870ef1e
CLN: D414: Section has no content (#31961)
simonjayhawkins Feb 13, 2020
72bc92e
CLN: 29547 replace old string formatting 3 (#31945)
3vts Feb 13, 2020
32b3d9e
CLN: 29547 replace old string formatting 4 (#31963)
3vts Feb 14, 2020
67fc9e0
CLN: index related attributes on Series/DataFrame (#31953)
topper-123 Feb 14, 2020
ff05154
add eval examples (#31955)
MarcoGorelli Feb 14, 2020
5dd27ed
CLN: remove unreachable in Series._reduce (#31932)
jbrockmendel Feb 14, 2020
fa2aa9f
Update documentation to use recommended library (#31968)
martinbjeldbak Feb 14, 2020
bfcfaae
CLN: 29547 replace old string formatting 5 (#31967)
3vts Feb 14, 2020
8425c26
STY: Fixed wrong placement of whitespace (#31974)
ShaharNaveh Feb 14, 2020
6d30046
CLN: 29547 replace old string formatting 6 (#31980)
3vts Feb 14, 2020
00a00a1
CI: Removed pattern check for specific modules (#31975)
ShaharNaveh Feb 14, 2020
bead1c3
TST: parametrize tests.indexing.test_float (#31855)
jbrockmendel Feb 15, 2020
8f49265
started to fixturize pandas/tests/base (#31701)
SaturnFromTitan Feb 15, 2020
153244b
Revert 31791 (#31931)
WillAyd Feb 15, 2020
571a73b
CLN 29547 Replace old string formatting syntax with f-strings (#31982)
alysbrooks Feb 15, 2020
b41911e
DOC PR09 Add missing . on freq parameter on groupby.py (#31998)
za Feb 15, 2020
74823a0
DOC PR09 Add . in the description parameter (#32001)
za Feb 15, 2020
e99db38
DOC PR09 Add missing . on Parameter con description (#32000)
asyarif93 Feb 15, 2020
eb97073
CI: temporary fix to the CI (#32011)
ShaharNaveh Feb 15, 2020
2aa9cb9
DOC: update ohlc docstring so that it reflects the real use #31919 (#…
dequadras Feb 15, 2020
53ece70
CI: silence numpy-dev failures (#32025)
simonjayhawkins Feb 15, 2020
cc4c0b3
CLN: D213: Multi-line docstring summary should start at the second li…
simonjayhawkins Feb 15, 2020
45d093d
Seventh batch of changes (#31986)
3vts Feb 15, 2020
206a547
CLN 2574 Replace old string formating (#32007)
panjacek Feb 15, 2020
92a64c7
CLN: GH29547 replace old string formatting (#32029)
pcandoalmeida Feb 15, 2020
3689e6c
Add period to parameter description (#32005)
DavaIlhamHaeruzaman Feb 15, 2020
2e8274b
DOC SS06 Make the summery in one line on offsets.py (#32021)
za Feb 15, 2020
10228cb
DOC: Improve docstring of Index.delete (#32015)
andhikayusup Feb 15, 2020
f163f25
DOC: Update pandas.Series.between_time docstring params (#32014)
adamwdb Feb 15, 2020
3118576
DOC: Add missing period to parameter description (#32022)
DavaIlhamHaeruzaman Feb 15, 2020
a7ecced
Eighth batch of changes (#32032)
3vts Feb 15, 2020
4f0568e
CI: change np-dev xfails to not strict (#32031)
simonjayhawkins Feb 16, 2020
05ab8ba
Added clang inline helper (#30990)
WillAyd Feb 16, 2020
06eb8db
CLN: Some groupby internals (#31915)
mroeschke Feb 17, 2020
267d2d8
DOC: Update of the 'getting started' pages in the sphinx section of t…
stijnvanhoey Feb 17, 2020
8444453
BUG: list-like to_replace on Categorical.replace is ignored or crash …
JustinZhengBC Feb 17, 2020
c81b0ba
Clean Up C Warnings (#31935)
WillAyd Feb 17, 2020
92bb4c9
REF: implement unpack_1tuple to clean up Series.__getitem__ (#31906)
jbrockmendel Feb 17, 2020
cea4059
REF: move loc-only methods to loc (#31859)
jbrockmendel Feb 17, 2020
3b4b86b
CLN: Clean reductions/test_reductions.py (#32035)
dsaxton Feb 17, 2020
7b0887c
DOC: pin gitdb2 (#32064)
TomAugspurger Feb 17, 2020
3da053c
BUG: fix length_of_indexer with boolean mask (#31897)
jbrockmendel Feb 18, 2020
ebeb407
WEB: update blog link to only include my pandas blog posts (#32051)
jorisvandenbossche Feb 18, 2020
bdc7fd0
CLN: GH29547 replace old string formatting (#32063)
pcandoalmeida Feb 18, 2020
9c06b30
CLN: remove unused from MultiIndex (#32030)
jbrockmendel Feb 18, 2020
f4dc9f9
REGR: fix op(frame, frame2) with reindex (#31679)
jbrockmendel Feb 19, 2020
aa1089f
CLN: Move info (#31876)
MarcoGorelli Feb 19, 2020
0c107bd
DOC: Update sort_index docs (#31898)
dsaxton Feb 19, 2020
3cb81ea
DOC: Mention black and PEP8 in pandas style guide (#32043)
raisadz Feb 19, 2020
ac3056f
REGR: show_versions (#32041)
simonjayhawkins Feb 19, 2020
02ac975
TYP: check_untyped_defs core.arrays.categorical (#32097)
simonjayhawkins Feb 19, 2020
30bb0f0
add messages to tests (#31852)
raisadz Feb 19, 2020
74181e1
CLN: Remove unused script find_commits_touching_func.py (#32071)
datapythonista Feb 20, 2020
421f654
Replace old string formatting syntax with f-strings (#32122)
raisadz Feb 20, 2020
96644d0
TYP: check_untyped_defs core.tools.datetimes (#32101)
simonjayhawkins Feb 20, 2020
60b8f05
CLN: Clean groupby/test_function.py (#32027)
dsaxton Feb 20, 2020
304209f
Added pd.NA to nulls_fixture (#31799)
WillAyd Feb 20, 2020
11164c3
REF: misplaced Series.combine_first tests (#32111)
jbrockmendel Feb 20, 2020
37a7006
added msg to TypeError test_to_boolean_array_error (#32103)
amy-graham-js Feb 20, 2020
27e18e5
TST: Fix bare pytest.raises in test_parsing.py (#32102)
mabroor Feb 20, 2020
2c1c36f
TYP: check_untyped_defs arrays.sparse.array (#32099)
simonjayhawkins Feb 20, 2020
a12ab06
CLN: simplify _setitem_with_indexer (#31887)
jbrockmendel Feb 20, 2020
73b2622
CLN: 29547 replace old string formatting (#32034)
3vts Feb 20, 2020
38e16c4
CLN: remove unused tm.isiterable (#32137)
jbrockmendel Feb 21, 2020
cb4f739
CI: skip geopandas downstream test (Anaconda installation issue) (#32…
jorisvandenbossche Feb 21, 2020
c05ef6f
BUG: Fix for convert_dtypes with mix of int and string (#32126)
Dr-Irv Feb 21, 2020
7d37ab8
REGR: read_pickle fallback to encoding=latin_1 upon a UnicodeDecodeEr…
pedroreys Feb 21, 2020
4a05601
CLN: make tm.N, tm.K private (#32138)
jbrockmendel Feb 21, 2020
d171c87
TST: add test for get_loc on tz-aware DatetimeIndex (#32152)
simonjayhawkins Feb 21, 2020
9353ca7
TST: add test for DataFrame.reindex on nearest tz-aware DatetimeIndex…
simonjayhawkins Feb 21, 2020
c0066f3
REG: dont call func on empty input (#32121)
jbrockmendel Feb 21, 2020
80d37ad
DOC: move whatsnew to sync master with Backport PR #32148 (#32151)
simonjayhawkins Feb 21, 2020
b9bcdc3
ENH: Enable indexing with nullable Boolean (#31591)
dsaxton Feb 22, 2020
9f7cd99
REF/TST: collect Index join tests (#32171)
jbrockmendel Feb 22, 2020
494ffd6
REF: organize base class Index tests (#31864)
jbrockmendel Feb 22, 2020
9e69040
CLN: some code cleanups in pandas/_libs/ (#31808)
ShaharNaveh Feb 22, 2020
dafec63
BUG: DataFrame.iat incorrectly wrapping datetime objects (#32089)
jbrockmendel Feb 22, 2020
8de4096
REF/TST: implement test_interpolate for Series (#32112)
jbrockmendel Feb 22, 2020
1825fa1
TST: method-specific files for DataFrame assign, interpolate (#32110)
jbrockmendel Feb 22, 2020
10d10c6
move method from LocationIndexer to Index (#31857)
jbrockmendel Feb 22, 2020
6ab00bc
REF: collect arithmetic benchmarks (#32116)
jbrockmendel Feb 22, 2020
628dfba
BUG: Fix incorrect _is_scalar_access check in iloc (#32085)
jbrockmendel Feb 22, 2020
a66e149
PERF: IntegerIndex._shallow_copy (#32130)
jbrockmendel Feb 22, 2020
9aa9e4f
CLN: NDFrame.__init__ unnecessary code (#32131)
jbrockmendel Feb 22, 2020
5ed1a0b
CLN: organize MultiIndex indexing tests (#31863)
jbrockmendel Feb 22, 2020
89d5f87
REF: standardize CategoricalIndex._shallow_copy usage (#32141)
jbrockmendel Feb 22, 2020
25443f0
CLN: Some code cleanups (#32176)
ShaharNaveh Feb 22, 2020
00e8e4a
BUG: disallow invalid dtype to CategoricalDtype._from_values_or_dtype…
jbrockmendel Feb 22, 2020
80387ae
REF: de-duplicate object-dtype handling (#32168)
jbrockmendel Feb 22, 2020
f9b49c8
used f-string (#32133)
PSY27 Feb 22, 2020
020dcce
BUG: using loc[int] with object index (#31905)
jbrockmendel Feb 22, 2020
b2ebd5a
dont skip keyerror for IntervalIndex (#31936)
jbrockmendel Feb 22, 2020
016482a
Turned class based tests into function based tests (#32184)
SaturnFromTitan Feb 22, 2020
dbc446a
CLN: no kwargs for take_with_is_copy (#32181)
jbrockmendel Feb 22, 2020
ab56348
CLN: F-string in pandas/tests/indexes/datetimes/test_to_period.py (#2…
jancervenka Feb 23, 2020
41bc226
BUG: Fix construction of Categorical from pd.NA (#31939)
dsaxton Feb 23, 2020
20a84a5
BUG: Avoid ambiguous condition in GroupBy.first / last (#32124)
dsaxton Feb 23, 2020
7017599
BUG: groupby nunique changing values (#32175)
MarcoGorelli Feb 23, 2020
7b99f03
TST: Fixed bare pytest.raises in test_window.py (#32158)
mabroor Feb 23, 2020
0edd2d9
annotations (#32193)
jbrockmendel Feb 23, 2020
034fab5
BUG: Index(categorical, dtype=object) not returning object dtype (#32…
jbrockmendel Feb 23, 2020
58df0ac
CLN: indexing comments and cleanups (#32082)
jbrockmendel Feb 23, 2020
d4293f0
BUG: catch almost-null-slice in _convert_slice_indexer (#31866)
jbrockmendel Feb 23, 2020
9a02c35
TST: parametrize and de-duplicate timedelta64 arithmetic tests (#32091)
jbrockmendel Feb 23, 2020
df49f53
REF: pass str_rep through arithmetic ops more consistently (#31297)
jbrockmendel Feb 23, 2020
aa6f241
Use fixtures in pandas/tests/base (#32046)
SaturnFromTitan Feb 23, 2020
1c142e7
REF: de-duplicate factorize and duplicated code (#32216)
jbrockmendel Feb 24, 2020
7d32184
Import OptionError in pandas.errors (#32142)
sumanau7 Feb 24, 2020
241bf60
CLN: Fix exception causes in datetimelike.py (#32164)
cool-RR Feb 25, 2020
54b4001
DOC: Update pandas.DataFrame.droplevel docstring (#32004)
asyarif93 Feb 25, 2020
ee9cb75
troubleshoot 32bit build (#32241)
jbrockmendel Feb 25, 2020
e88629f
CI: Remove float16 fixture value (#32221)
SaturnFromTitan Feb 25, 2020
69f4c70
REF/TST: method-specific files for DataFrame timeseries methods (#32230)
jbrockmendel Feb 25, 2020
cf993fd
REF/TST: method-specific files for rename, reset_index (#32227)
jbrockmendel Feb 25, 2020
1bcc368
REF/TST: method-specific files for combine, update; parametrize (#32228)
jbrockmendel Feb 25, 2020
2227c83
REF/TST: method-specific files for Series timeseries methods (#32226)
jbrockmendel Feb 25, 2020
2eca9e8
CLN/REF: Split up / clean Categorical constructor tests (#32211)
dsaxton Feb 25, 2020
786bfd9
TST: show_versions test with unmerged commits (#32139)
jbrockmendel Feb 26, 2020
c5e3e25
implement test_select_dtypes (#32250)
jbrockmendel Feb 26, 2020
5f9fb1d
test_combine.py (#32253)
jbrockmendel Feb 26, 2020
972ab61
Collect Series.append tests (#32254)
jbrockmendel Feb 26, 2020
7c7048c
REF: test_to_timestamp (#32248)
jbrockmendel Feb 26, 2020
f3a9b78
CLN: generic tests (#32256)
jbrockmendel Feb 26, 2020
a152c30
PERF: lazify consolidate_check and dont consolidate in get_slice (#32…
jbrockmendel Feb 26, 2020
89ed095
CLN: simplify+annotate _shallow_copy (#32244)
jbrockmendel Feb 26, 2020
7c5d3d5
REF: include CategoricalIndex in index_cached parametrization (#32215)
jbrockmendel Feb 26, 2020
2fc8559
CLN: simplify CategoricalIndex._simple_new (#32204)
jbrockmendel Feb 26, 2020
9bf3a28
ENH: Timestamp constructor now raises more explanatory error message …
fujiaxiang Feb 26, 2020
8b200c1
ENH: Implement DataFrame.value_counts (#31247)
dsaxton Feb 26, 2020
6c74f88
use ExtensionIndex._concat_same_dtype (#32232)
jbrockmendel Feb 26, 2020
cf957ad
REF: simplify IntervalIndex/IntervalArray _shallow_copy (#32247)
jbrockmendel Feb 26, 2020
2885b30
CLN/TST: parametrize some tests in tests.indexing.test_float (#32187)
jbrockmendel Feb 26, 2020
a713063
Add link to pandas-tfrecords (#32143)
schipiga Feb 26, 2020
1b8b428
CLN: remove dtype kwarg from _simple_new (#32260)
jbrockmendel Feb 26, 2020
6e04264
ENH: add fold support to Timestamp constructor (#31563)
AlexKirko Feb 26, 2020
27f0000
REGR: preserve freq in DTI/TDI outer join (#32166)
jbrockmendel Feb 26, 2020
35537dd
BUG: Cast pd.NA to pd.NaT in to_datetime (#32214)
dsaxton Feb 26, 2020
9535246
Added message to pytest raises for test_constructor_dict (#32236)
Dom-L-G Feb 26, 2020
e39cd30
Fix exception causes in 14 modules (#32235)
cool-RR Feb 26, 2020
e6bd49f
use numexpr for Series comparisons (#32047)
jbrockmendel Feb 26, 2020
d8115ce
DOC: Fix pandas.index.copy summary documentation (#32006)
asepwhite Feb 26, 2020
9a8e83a
DOC: Improve documentation for Index.where (#32009)
laymonage Feb 26, 2020
52a63ab
DOC: Fix errors in pandas.Series.argmax (#32019)
farhanreynaldo Feb 26, 2020
ed7adcd
CI: Remove docs build from pipelines (#32074)
datapythonista Feb 26, 2020
2c060b4
DOC: add missing links to introduction to pandas (#32198)
raisadz Feb 27, 2020
8621970
TST: move misplaced to_datetime test (#32273)
jbrockmendel Feb 27, 2020
97c0ce9
Troubleshoot CI (#32284)
jbrockmendel Feb 27, 2020
eb6f8d3
test_droplevel (#32272)
jbrockmendel Feb 27, 2020
66c6e8e
Use defaultdict for optimization (#32278)
jaketae Feb 27, 2020
922f932
PERF: pass through to numpy validation for iloc setitem (#32257)
jbrockmendel Feb 27, 2020
736761f
TST: misplaced arithmetic tests (#32275)
jbrockmendel Feb 27, 2020
cad3f1c
CLN: Follow-up to #32158 (#32290)
simonjayhawkins Feb 27, 2020
0233a55
TST: implement test_first (#32274)
jbrockmendel Feb 27, 2020
674dd69
CI: Temporary fix to the docs build while we fix the ssh problems (#3…
datapythonista Feb 27, 2020
217a428
TST: test_to_time (#32285)
jbrockmendel Feb 27, 2020
1d18e95
implement test_to_period (#32270)
jbrockmendel Feb 27, 2020
86f0468
fixed minor docstring typo (#32298)
mankoff Feb 27, 2020
d5d6834
REF/TST: misplaced tests in test_timeseries, test_timezones (#32300)
jbrockmendel Feb 27, 2020
b4cbc19
Added in a error message (#32105)
Samira-g-js Feb 27, 2020
4800ab4
DOC: Add example for multiindex series and dataframe merge (#32068)
ryankarlos Feb 27, 2020
ea1d8fa
BUG: fix in categorical merges (#32079)
MarcoGorelli Feb 27, 2020
1e7dc49
WEB: Add greeting note to CoC (#32024)
MarcoGorelli Feb 27, 2020
5fa9860
API/BUG: raise only KeyError failed on geitem/loc lookups (#31867)
jbrockmendel Feb 27, 2020
edcf1c8
DOC: Reorder 1.0 releases in whatsnew/index.rst (#32309)
mroeschke Feb 28, 2020
7eb6713
check parser_dates names in columns
sathyz Feb 9, 2020
5cadb42
fix lint issue.
sathyz Feb 11, 2020
7fed1ca
validate parse_dates - added nested list case
sathyz Feb 28, 2020
999ffc5
format code based on ci checks
sathyz Feb 28, 2020
5b381e3
Merge remote-tracking branch 'origin/issue-31251-1' into issue-31251-1
sathyz Feb 28, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions pandas/io/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import csv
import datetime
from io import BufferedIOBase, RawIOBase, StringIO, TextIOWrapper
from itertools import chain
import re
import sys
from textwrap import fill
Expand Down Expand Up @@ -1423,6 +1424,26 @@ def __init__(self, kwds):
# keep references to file handles opened by the parser itself
self.handles = []

def _confirm_parse_dates_presence(self, columns):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to _valdate_parse_dates

pls add type annotations for columns

"""
if user has provided names for parse_dates, check if those columns
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a full-docstring (see other validation functions)

are available.
"""
if isinstance(self.parse_dates, list):
cols_needed = self.parse_dates
elif isinstance(self.parse_dates, dict):
cols_needed = chain(*self.parse_dates.values())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you need the chain here?

Copy link
Member

@gfyoung gfyoung Feb 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is okay. The reason is that parse_dates as a dict maps column names to lists columns or individual columns. chain is used to "flatten" them out into a single iterable.

That being said, we should definitely check this (see my other comment about adding tests)

else:
cols_needed = []
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so this is a single scalar column, why is it not needing validation?

Copy link
Contributor Author

@sathyz sathyz Feb 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parser_dates: bool or list of int or names or list of lists or dict, default False

according to the read_csv doc, this can't be a single scalar.


missing_cols = ", ".join(
[col for col in cols_needed if isinstance(col, str) and col not in columns]
)
if missing_cols:
raise ValueError(
f"Missing column provided to 'parse_dates': '{missing_cols}'"
)

def close(self):
for f in self.handles:
f.close()
Expand Down Expand Up @@ -1942,6 +1963,7 @@ def __init__(self, src, **kwds):
if len(self.names) < len(usecols):
_validate_usecols_names(usecols, self.names)

self._confirm_parse_dates_presence(self.names)
self._set_noconvert_columns()

self.orig_names = self.names
Expand Down Expand Up @@ -2312,6 +2334,7 @@ def __init__(self, f, **kwds):
if self.index_names is None:
self.index_names = index_names

self._confirm_parse_dates_presence(self.columns)
if self.parse_dates:
self._no_thousands_columns = self._set_no_thousands_columns()
else:
Expand Down
12 changes: 12 additions & 0 deletions pandas/tests/io/parser/test_parse_dates.py
Original file line number Diff line number Diff line change
Expand Up @@ -1516,3 +1516,15 @@ def test_hypothesis_delimited_date(date_format, dayfirst, delimiter, test_dateti

assert except_out_dateutil == except_in_dateutil
assert result == expected


@pytest.mark.parametrize("parse_dates", [["time"], {"date": ["time"]}])
def test_missing_column(all_parsers, parse_dates):
"""GH31251 column names provided in parse_dates could be missing."""
parser = all_parsers
content = StringIO("time,val\n2020-01-31,32\n")
msg = "Missing column provided to 'parse_dates': 'time'"
with pytest.raises(ValueError, match=msg):
parser.read_csv(
content, sep=",", usecols=["val"], parse_dates=parse_dates,
)
Copy link
Member

@gfyoung gfyoung Feb 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Add a test where names is also passed in
  • Add a test where parse_dates is a nested list