Skip to content

Commit

Permalink
fixed csv reader issue for the bosch dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
nvidia-johnq committed Oct 21, 2020
1 parent 9f109a4 commit d545c1e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,9 @@ def prepare_bosch(dataset_folder, nrows):

os.system("kaggle competitions download -c bosch-production-line-performance -f " +
filename + " -p " + dataset_folder)
X = pd.read_csv(local_url, index_col=0, compression='zip', dtype=np.float32,
nrows=nrows)
X = pd.read_csv(local_url,compression='zip', dtype=np.float32)
X = X.set_index('Id')
X.index = X.index.astype('int64')
y = X.iloc[:, -1].to_numpy(dtype=np.float32)
X.drop(X.columns[-1], axis=1, inplace=True)
X = X.to_numpy(dtype=np.float32)
Expand Down

0 comments on commit d545c1e

Please sign in to comment.