TemporaryFile as input to read_table raises TypeError: '_TemporaryFileWrapper' object is not an iterator · Issue #13398 · pandas-dev/pandas (original) (raw)
Although the requirement in the doc says that the input can be a file like object, it doesn't work with objects from tempfile. On Windows, they can't be reopened, so I need to pass the object itself.
Code Sample, a copy-pastable example if possible
import pandas as pd
from tempfile import TemporaryFile
new_file = TemporaryFile("w+")
dataframe = pd.read_table(new_file, skiprows=3, header=None, sep=r"\s*")
Expected Output
Not an exception!
output of pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 3.5.1.final.0
python-bits: 64
pandas: 0.18.0