Skip to content
Advertisement

Convert openpyxl to pandas

After doing some research I understood that pandas can give us better performace comparing to openpyxl. I’m trying to convert this code from openpyxl to pandas: Anyone can give me a suggestion about how to convert this code? Answer Here is the equivalent code using pandas: This code uses pandas to read the data from the “VendorInfo” sheet into a

how to transform dataframe into data set/object

I have a data set in a dataframe that’s almost 9 million rows and 30 columns. As the columns count up, the data becomes more specific thus leading the data in the first columns to be very repetitive. See example: park_code camp_ground parking_lot acad campground1 parking_lot1 acad campground1 parking_lot2 acad campground2 parking_lot3 bisc campground3 parking_lot4 I’m looking to feed that

SKLearn & ElasticNet: Cross validation fails when using Accuracy as a metric

I have a binary classification problem. I’ve been using cross validation to optimize the ElasticNet parameters. However ElasticNet only seems to work when I supply roc_auc as the scoring method to be used during CV, However I also want to test out a wide range of scoring methods, in particular accuracy. Specifically, when using accuracy, ElasticNet returns this error: However

Advertisement