0

I have a dataframe with about 60 columns that I need to normalize before I can run it through a multiple regression analysis. Are there python packages that can do this? I have already seen code or answers that can achieve this but not packages.

  • 2
    And what's wrong with using code that is not imported from a package? – Guy Aug 24 '22 at 13:38
  • What do you mean by normalize in the first place? This word has different meanings in statistics and databases. Pandas and Numpy have several relevant functions already but you may not need even those – Panagiotis Kanavos Aug 24 '22 at 13:43
  • Why is this question not a duplicate of eg [Normalize Columns of a DataFrame](https://stackoverflow.com/questions/26414913/normalize-columns-of-a-dataframe) ? – Panagiotis Kanavos Aug 24 '22 at 13:45
  • Nothing is wrong with it at all. I figured a package would make sure it is done correctly as I am new to the Python analytics and I am learning my way around since the multiple regression is something I was not taught when I got my degree. – Evan_does_python Aug 24 '22 at 13:45
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Aug 24 '22 at 19:19

1 Answers1

0

If my machine-learning spider senses are correct, I would suggest using sklearn.preprocessing.StandardScaler in a sklearn Pipeline before feeding the data to a model. See documentation here

This completely delegates the normalization to the sklearn package.

SystemSigma_
  • 1,059
  • 4
  • 18