hi, guys, I need to deal with a zipped CSV file ......but getting this error again and again
import pandas as pd
with gzip.open(path) as f:
features_train = pd.read_csv(f)
This type of error will occur if there is any problem to decode any value. To avoid this you can follow the below-given code.
$ features_train = pd.read_csv('csv_file', encoding='ISO-8859–1')
It's still most likely gzipped data. gzip's the magic number is 0x1f 0x8b, which is consistent with the UnicodeDecodeError you get.
You have to use the encoding as latin1 ...READ MORE
Regarding your query, you can go ...READ MORE
import numpy as np
from matplotlib ...READ MORE
I should start by stating that using ...READ MORE
A simple "if" statement should suffice. you ...READ MORE
Try using the following:
df['id'] = df.index+1
df.set_index('id').col_name.str.split(',', expand ...READ MORE
Thanks, This answer was helpful. READ MORE
The error is because there is some non-ASCII ...READ MORE
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.