We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9823b15 commit ca2e5f5Copy full SHA for ca2e5f5
pandas_datareader/compat/__init__.py
@@ -51,6 +51,8 @@ def get_filepath_or_buffer(filepath_or_buffer, encoding=None, compression=None):
51
52
53
def str_to_bytes(s, encoding=None):
54
+ if isinstance(s, bytes):
55
+ return s
56
return s.encode(encoding or "ascii")
57
58
0 commit comments