In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
What are the data analysis functions in Python? I believe many inexperienced people are at a loss about this. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
The digitization of classification variables refers to the conversion of enumerated variables into indicator vectors or dummy vectors. What is an indicator vector? take a look at the following example. The A variable is parsed as: [1], and the B is parsed as: [0].
S = pd.Series (list ('ABCA')) pd.get_dummies (s) # results AB C0 1 0 01 01 02 0 0 13 1 0 0
In addition to get_dummies, there is also an enumerated type variable annotation function: factorize, which has the following functions:
Labels, uniques = pd.factorize (['A','B','C','A']) # result labels is the ndarrays:array ([0, 1, 2, 0], dtype=int64) uniques:array (['A','B','C'], dtype=object) of NumPy. Have you mastered any data analysis functions in Python after reading the above? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.