In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the relevant knowledge of how to install and use pandas in python, the content is detailed and easy to understand, the operation is simple and fast, and it has a certain reference value. I believe you will have something to gain after reading this article on how to install and use pandas in python. Let's take a look.
Description
1. The combined abbreviation of python+data+analysis is a third-party data analysis library based on numpy and matplotlib in python.
2. Together constitute the basic toolkit for python data analysis, with the names of three swordsmen.
Installation
Open cmd and enter the following three commands in turn.
Pip install pandas-I https://pypi.tuna.tsinghua.edu.cn/simplepip install numpy-I https://pypi.tuna.tsinghua.edu.cn/simplepip install matplotlib-I https://pypi.tuna.tsinghua.edu.cn/simple
Pandas selection data
Import pandas as pdimport numpy as npdates = pd.date_range ('20210301, periods=6) df1 = pd.DataFrame (np.arange (24). Reshape ((6, 4)), index=dates, columns= [' A', 'Bao,' C,'D']) print (df1)
Pandas assignment and operation
Import pandas as pdimport numpy as npdates = pd.date_range ('20210301, periods=6) df1 = pd.DataFrame (np.arange (24). Reshape ((6, 4)), index=dates, columns= [' A', 'Bao,' C,'D']) print (df1)
How to deal with empty data in pandas
Import pandas as pdimport numpy as npdates = pd.date_range ('20210301, periods=6) df1 = pd.DataFrame (np.arange (24). Reshape ((6, 4)), index=dates, columns= [' A','B','C','D']) df2 = pd.DataFrame (df1, index=dates, columns= ['A','B','C','E','F']) S1 = pd.Series ([3,4,6,7]) Index=dates [: 4]) # assign the first to the fourth data S2 = pd.Series ([32, 5, 2, 1], index=dates [2:]) # assign the third data to the last data df2 ['E'] = s1df2 ['F'] = s2print (df2) this is the end of the article on "how to install and use pandas in python" Thank you for reading! I believe that everyone has a certain understanding of the knowledge of "how to install and use pandas in python". If you want to learn more, you are welcome to follow the industry information channel.
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: 218
*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.