Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

Update pywqp_client.py #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions pywqp/pywqp_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import sys
import os.path
import pandas as pd
import StringIO
import io
import wqx_mappings
import xml.etree.ElementTree as et

Expand Down Expand Up @@ -155,7 +155,7 @@ def response_as_pandas_dataframe(self, response):

dataframe = None
if content_type == 'text/csv':
dataframe = pd.read_csv(StringIO.StringIO(response.content))
dataframe = pd.read_csv(io.BytesIO(response.content))
elif content_type == 'text/xml' or content_type == 'application_xml':
mapper = wqx_mappings.WQXMapper()
dataframe = mapper.make_dataframe_from_http_response(response)
Expand Down