Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Pandas/scikit-learn: get_dummies test/train sets – ValueError: shapes not aligned

I’ve been using panda’s get_dummies function to generate dummy columns for categorical variables to use with scikit-learn, but noticed that it sometimes doesn’t work as I expect.               Prerequisites import pandas as pd import numpy as np from sklearn import linear_model import pandas as pd import numpy as np ...



This post first appeared on Java Code Geeks, please read the originial post: here

Share the post

Pandas/scikit-learn: get_dummies test/train sets – ValueError: shapes not aligned

×

Subscribe to Java Code Geeks

Get updates delivered right to your inbox!

Thank you for your subscription

×