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/01 Report--
This article mainly shows you "what is the use of pandas in data analysis", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "what is the use of pandas in data analysis" this article.
Data analysis
The Foundation of python data Science
The basis of machine learning courses
Tools anaconda and jupyter
Matplotlib
View the system font: fc-list: lang=zh
Numpy
NumPy is the basic package for scientific computing using Python.
Official website: https://www.numpy.org.cn/
Pandas
Seres one-dimensional array
T.index
T.values
DataFrame two-dimensional array
Method 1: delete the row and column of NaN dropna (axis=0,how='any',inplace=False)
Processing method 2: populate data t.fillna (t.mean ()) # mean, t.fiall (t.median ()), t.fillna (0)
Data processed as 0: t [tasking 0] = np.nan of course, it is not necessary to calculate the average value every time the data is 0. Nan does not participate in the calculation, but 0 will.
Specify index: t.index = ['x','y']
Reset the index: t.reindex (['x','y'])
Specify a column as the index:t.set_index ("name", drop=False)
Returns the unique value of index: t.set_index ("name") .index.unique ()
Swap the index in levels: t.swaplevel ()
Row index, indicating different rows, horizontal index, called index,0 axis, axis=0
Row index, indicating different columns, vertical index, called columns,1 axis, axis=1
T.index row index
T.columns column index
T.values object value, 2D ndarray array
T.shape shape (rows, columns)
T.dtypes Typ
T.ndim data dimension
T.head (3) displays several lines of the header, with a default of 5 lines
T.tail (3) displays the trailing lines, with a default of 5 lines
Overview of t.info () related information: number of rows, number of columns, column index, number of column non-null values, column type, row type, memory footprint
T.describe () Fast synthesis of statistical results: calculation, mean, standard deviation, maximum, quartile, minimum
T.loc () indexes row data through tags
T.iloc () gets row data by location
Judge whether the data is NaN:pd.isnull (t), pd.notnull (t)
Common statistical methods of pandas
On: specify column
How- > inner (default) intersection merge
Merge in how- > outer union mode, NaN completion
How- > left shall be merged on the left and completed by NaN
How- > right shall be merged on the right, and completed by NaN.
Average: df ["xx"] .mean ()
Maximum: df ["xx"] .max ()
Maximum index: df ["xx"] .idxmax ()
Minimum: df ["xx"] .max ()
Minimum index: df ["xx"] .idxmin ()
Median: df ["xx"] .median ()
Join: the default is to merge data with the same row index together t1.join (T2)
Merge: merges data together in a certain way according to the specified columns t1.merge (T2, on= "a", how= "inner")
Time series.
Ps.to_datetime (df ["timeStamp"])
The above is all the contents of the article "what is the use of pandas in data Analysis". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, 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: 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.