当前位置:网站首页>[data analysis and display]
[data analysis and display]
2022-06-30 08:30:00 【yyqx&xxxx】
conda
A tool , For package management and environment management
Package management and pip similar
Environmental management allows users to use different versions python, And can switch flexibly
The dimensions of data
The organization of a set of data
Lists and arrays
The ordered structure of a set of data
difference : list : Data types can be different
Array : Same data type
Two dimensional data : Multiple one bit data constitute , Is a combination of one bit of data
Multidimensional data : One dimensional and two-dimensional data are expanded in new dimensions to form
High dimensional data : Use the most basic binary relationship to show the complex structure between data
numpy——scipy,pandas Data processing or science · Basis of calculation library
1, One Powerful N Dimensional array object ndarray
2, Broadcast function
3, Integrate c/c++ Code tools
4, linear algebra , The Fourier transform , Random number generation and other functions
introduce :
import numpy as np
ndarray:N Dimensional array object
The array object can remove the loop required by the operation between elements , Make a one-dimensional vector more like a single data
Set special array objects , optimized , It can improve the computing speed of this kind of application
General , The type of all data in a dimension is often the same . Array objects use the same data type , It helps to save computing and storage space
ndarray Two parts make up :
1, The actual data
2, Metadata that describes the data ( Data dimension , Data type, etc )
Axis : Save the dimension of the data , Rank : Number of shafts
ndarray attribute :.ndim Rank , Number of dimensions ·
.shape Object size
.size Element number
.dtype Element type
.itemsize Element size
establish ndarray
(1)x = np.array(list/tuple)
When np.array() Don't specify dtype when ,numpy Will associate a based on the data dtype type
1, Create from list type
2, Create from tuple type
3, Create from list and tuple mixed types
(2) Function creation
arange,ones,zeros etc.
eg:np.arange(10)
np.ones((3,6))
(3) Other functions create
ndarray Array transformation
Dimensional transformation
.reshape(shape) Do not change array elements , Return to one shape Array of shapes the original array remains unchanged
.resize(shape) Modify the original array
.swapaxes(ax1,ax2) Will array n Two of the three dimensions are exchanged
.flatten() Dimension the array , The original array remains the same
ndarray Array type transformation
new_a = a.astype(new_type)
Index and slice of arrays
A one-dimensional : And python The list of is similar to
Index of multidimensional array
Slices of multidimensional arrays
The operation between an array and a scalar
The operation between an array and a scalar acts on every element of the array
numpy One variable function
numpy Dual function
边栏推荐
- Leetcode47. full arrangement II
- Experiment 6 examination
- [nvme2.0b 14-7] set features (Part 1)
- 电流探头电路分析
- TiDB 6.0:让 TSO 更高效丨TiDB Book Rush
- Tidb v6.0.0 (DMR): initial test of cache table - tidb Book rush
- Gilbert Strang's course notes on linear algebra - Lesson 1
- 在浏览器输入url到页面展示出来
- layer.open 当传值为数组或值太长时处理方法
- MIME type Encyclopedia
猜你喜欢
Wechat official account third-party platform development, zero foundation entry. I want to teach you
Flink Sql -- toAppendStream doesn‘t support consuming update and delete changes which
Redis设计与实现(一)| 数据结构 & 对象
An example of a single service in a cloud project driven by a domain
[nvme2.0b 14-8] set features (Part 2)
示波器探头对测量电容负荷有影响吗?
【NVMe2.0b 14-8】Set Features(下篇)
[untitled]
What are the Amazon evaluation terms?
el-input 限制只能输数字
随机推荐
【NVMe2.0b 14-8】Set Features(下篇)
Redis设计与实现(八)| 事务
vite项目require语法兼容问题解决require is not defined
C# Console. Writeline() function output format
Unity简单shader
涂鸦Wi-Fi&BLE SoC开发幻彩灯带
【NVMe2.0b 14-5】Firmware Download/Commit command
亚马逊测评术语有哪些?
Redis设计与实现(四)| 主从复制
Swagger use
TiDB v6.0.0 (DMR) :缓存表初试丨TiDB Book Rush
MIME type Encyclopedia
C # listbox how to get the selected content (search many invalid articles)
Redis design and Implementation (I) | data structure & object
1162 Postfix Expression
【NVMe2.0b 14-5】Firmware Download/Commit command
Cesium learning notes (V) custom geometry and appearance
Oracle expansion table space installed in docker
国债逆回购绝对安全吗 网上怎么开户
Redis设计与实现(三)| 服务器与客户端的交互(事件IO模型)