Kushwanth Chowday Kandala commited on
Commit
39dae03
1 Parent(s): 0bff6fd

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf9 in position 11: invalid start byte

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -149,13 +149,13 @@ with st.sidebar:
149
  # st.write(bytes_data)
150
 
151
  # To convert to a string based IO:
152
- stringio = StringIO(uploaded_file.getvalue().decode("utf-8"))
153
- st.write(stringio)
154
 
155
  # To read file as string:
156
  # string_data = stringio.read()
157
  # st.write(string_data)
158
 
159
  # Can be used wherever a "file-like" object is accepted:
160
- # dataframe = pd.read_csv(uploaded_file)
161
- # st.write(dataframe)
 
149
  # st.write(bytes_data)
150
 
151
  # To convert to a string based IO:
152
+ # stringio = StringIO(uploaded_file.getvalue().decode("utf-8"))
153
+ # st.write(stringio)
154
 
155
  # To read file as string:
156
  # string_data = stringio.read()
157
  # st.write(string_data)
158
 
159
  # Can be used wherever a "file-like" object is accepted:
160
+ dataframe = pd.read_csv(uploaded_file, encoding='unicode_escape')
161
+ st.write(dataframe)