Summary of data types in python

There is no array in Python, only lists, tuples, sets, dicts, Numbers, and Boolean , string String

Only when third-party libraries are introduced in pythonnumpy can arrays be found
Array array:
[Array indexing and slicing, you really need to take a good look~]

Column table list: e=[1,2,3,“a”] ---------------→ Braces:g=(1,2,3,4) ---------------→ Parentheses< /span>: i={“a”:a,“b”:b,“c” :c,“d”:d,“e”:e,'i':“xiaogao”} ---------------→ HanabukugoDictionary dict: h={'a',“b”,1,(1,2),“hishis”} ------- --------→ Hanabukugoset set
Gen组tuple

Dictionary initialization:d1 = {'x': 1, 'y': 2} ord2 = dict(x = 1, y = 2)
[tips1: In other words, when you see double curly braces { } or dict( ), the data type is a dictionary]< a i=5> [tips2: Dictionary initialization method: https://blog.csdn.net/qq_41899990/article/details/100338679]

if wishPreserve the order in which elements were inserted, just use a list. if wishEliminate duplicate elements (and don't care about their order), just use collections.

Python has a total of 68 built-in functions, including print()

Python's pandas library tutorial:
English: https://pandas.pydata.org/docs/user_guide/10min.html
Chinese translation Version: https://www.pypandas.cn/docs/getting_started/10min.html

[To be learned] Third-party libraries for processing data:

  • numpy # Open source Python data science computing library. The basic object of Numpy is the ndarray object, which is a multi-dimensional array object.
  • pandas # Secondary development based on the Numpy library
  • scipy # SciPy is an open source Python algorithm library and mathematical toolkit. Scipy is a scientific computing library based on Numpy, used in mathematics, science, engineering and other fields. Many high-order abstract and physical models require the use of Scipy. SciPy includes modules for optimization, linear algebra, integration, interpolation, special functions, fast Fourier transform, signal processing and image processing, solving ordinary differential equations, and other calculations commonly used in science and engineering.

Deep learning third-party library:
pytorch

Guess you like

Origin blog.csdn.net/summertime1234/article/details/129531693