BUG: syntax error in hdf query with ts
State: closed

 - [x] closes #15492
 - [x] tests added / passed
 - [x] passes ``git diff upstream/master | flake8 --diff``
 - [x] whatsnew entry


Labels:
name: Error Reporting
description: Incorrect or improved errors from pandas
name: IO HDF5
description: read_hdf, HDFStore

Comments:
lgtm. merge on green (travis is *very* slow atm though)
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/15544?src=pr&el=h1) Report
> Merging [#15544](https://codecov.io/gh/pandas-dev/pandas/pull/15544?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/1c106c8427513775c59e1e93a20829fc67a0a983?src=pr&el=desc) will **decrease** coverage by `-0.03%`.
> The diff coverage is `100%`.


```diff
@@            Coverage Diff             @@
##           master   #15544      +/-   ##
==========================================
- Coverage   91.06%   91.04%   -0.03%     
==========================================
  Files         136      136              
  Lines       49102    49165      +63     
==========================================
+ Hits        44717    44764      +47     
- Misses       4385     4401      +16
```


| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/15544?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/computation/pytables.py](https://codecov.io/gh/pandas-dev/pandas/compare/1c106c8427513775c59e1e93a20829fc67a0a983...8288dcaa62cfcb2bc827e1c7b49589bca77a1bdc?src=pr&el=tree#diff-cGFuZGFzL2NvbXB1dGF0aW9uL3B5dGFibGVzLnB5) | `91.59% <100%> (+0.98%)` | :white_check_mark: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/compare/1c106c8427513775c59e1e93a20829fc67a0a983...8288dcaa62cfcb2bc827e1c7b49589bca77a1bdc?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-61.67%)` | :x: |
| [pandas/util/decorators.py](https://codecov.io/gh/pandas-dev/pandas/compare/1c106c8427513775c59e1e93a20829fc67a0a983...8288dcaa62cfcb2bc827e1c7b49589bca77a1bdc?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvZGVjb3JhdG9ycy5weQ==) | `62.26% <0%> (-6.97%)` | :x: |
| [pandas/tools/merge.py](https://codecov.io/gh/pandas-dev/pandas/compare/1c106c8427513775c59e1e93a20829fc67a0a983...8288dcaa62cfcb2bc827e1c7b49589bca77a1bdc?src=pr&el=tree#diff-cGFuZGFzL3Rvb2xzL21lcmdlLnB5) | `91.78% <0%> (-0.35%)` | :x: |
| [pandas/indexes/frozen.py](https://codecov.io/gh/pandas-dev/pandas/compare/1c106c8427513775c59e1e93a20829fc67a0a983...8288dcaa62cfcb2bc827e1c7b49589bca77a1bdc?src=pr&el=tree#diff-cGFuZGFzL2luZGV4ZXMvZnJvemVuLnB5) | `93.24% <0%> (-0.31%)` | :x: |
| [pandas/indexes/base.py](https://codecov.io/gh/pandas-dev/pandas/compare/1c106c8427513775c59e1e93a20829fc67a0a983...8288dcaa62cfcb2bc827e1c7b49589bca77a1bdc?src=pr&el=tree#diff-cGFuZGFzL2luZGV4ZXMvYmFzZS5weQ==) | `96.17% <0%> (-0.06%)` | :x: |
| [pandas/core/series.py](https://codecov.io/gh/pandas-dev/pandas/compare/1c106c8427513775c59e1e93a20829fc67a0a983...8288dcaa62cfcb2bc827e1c7b49589bca77a1bdc?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc2VyaWVzLnB5) | `94.89% <0%> (-0.05%)` | :x: |
| [pandas/tseries/resample.py](https://codecov.io/gh/pandas-dev/pandas/compare/1c106c8427513775c59e1e93a20829fc67a0a983...8288dcaa62cfcb2bc827e1c7b49589bca77a1bdc?src=pr&el=tree#diff-cGFuZGFzL3RzZXJpZXMvcmVzYW1wbGUucHk=) | `94.46% <0%> (-0.01%)` | :x: |
| [pandas/core/groupby.py](https://codecov.io/gh/pandas-dev/pandas/compare/1c106c8427513775c59e1e93a20829fc67a0a983...8288dcaa62cfcb2bc827e1c7b49589bca77a1bdc?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ3JvdXBieS5weQ==) | `94.99% <0%> (-0.01%)` | :x: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/compare/1c106c8427513775c59e1e93a20829fc67a0a983...8288dcaa62cfcb2bc827e1c7b49589bca77a1bdc?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.83% <0%> (-0.01%)` | :x: |
| ... and [8 more](https://codecov.io/gh/pandas-dev/pandas/pull/15544?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/15544?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/15544?src=pr&el=footer). Last update [1c106c8...8288dca](https://codecov.io/gh/pandas-dev/pandas/compare/1c106c8427513775c59e1e93a20829fc67a0a983...8288dcaa62cfcb2bc827e1c7b49589bca77a1bdc?el=footer&src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
thanks!
@chris-b1 so I narrowed down what this commit fixes (in the docs): https://github.com/pandas-dev/pandas/pull/15647/commits/0fd4499b19d9f3eedacd59431f11e435bce3cb65

though I still can't repo locally, I think this might be an encoding of the input file (as ascii) and not utf8.

A bare string is interpreted as ascii codes (e.g. 'foo' -> 102......)

so quoting is important. Ideally we could give a better message (though as I said I can't repro locally, sphinx must be doing something).

you can try using an encoding for the file maybe. 

of course only if you have a chance to look at this :>
Yeah, I'll take a closer look later today.  Just making a note for myself, the other difference from the cases tested in this PR is that the doc example contains missing data.

https://github.com/jreback/pandas/blob/6afb3944017533c3dc6df70a144df48f85e1c1f8/doc/source/whatsnew/v0.10.1.txt#L54