Trying to convert categorical data to numeric and run RandomForestClassifier

I’m testing this code. df1 = df[[‘Group’, ‘Sector’, ‘Cat2’, ‘Cat3’, ‘Cat4’, ‘Cat5’, ‘Cat6’, ‘Industry’, ‘Market’, ‘Price’]].copy() df1 = df1[:100000] df1.shape df1 = df1.fillna(0) df1 = pd.get_dummies(df1) X = df1.drop([‘Price’], axis=1) y = df1[‘Price’] from sklearn.model_selection import train_test_split # Split dataset into training set and test set X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3) #…

Details

Request made with axios does not work but if it works with XMLHttpRequest

I’m doing a Request from react with axios, that request looks like this: const data= axios.post(route, { username:’admin’, password:’123′ }) .then(response =>{ console.log(response) }) .catch(err=>{console.log(err.response) }) But it gives me back status 400. I thought it was something with the ‘CORS’ but when I make the request with XMLHttpRequest from react, it is successful. Here the same request made with XMLHttpRequest: var xhr = new XMLHttpRequest(); var…

Details