_Python Data Science Cheat Sheet NumPy Basics 4 .pdf
DigitalMarketing583724
28 views
5 slides
Feb 03, 2025
Slide 1 of 5
1
2
3
4
5
About This Presentation
π Elevate your Python skills: Easy manipulation of NumPy Arrays
NumPy arrays themselves are made specifically for easily manipulating data via high-powered functions. Talking big data or building workload optimizations with fewer resources, then chances are, you really need to absorb these.
With...
π Elevate your Python skills: Easy manipulation of NumPy Arrays
NumPy arrays themselves are made specifically for easily manipulating data via high-powered functions. Talking big data or building workload optimizations with fewer resources, then chances are, you really need to absorb these.
With NumPy, you can:
π Transpose arrays giving you the ability to switch dimensions immediately.
π Reshape and resize arrays to suit your desired analysis.
π Merging arrays with the help of concatenate, vstack, and hstack.
β Splitting arrays into specific parts with hsplit and vsplit commands.
ββ Adding and deleting elements with the append and delete commands, respectively.
π Uses a function such as ravel to flatten arrays into a single dimension.
π‘ Pro Tip: Doing this in just one or two lines of code can turn complex data structures into data ready for insights!
β Which Numpy function do you find the most powerful? Let us know in the comments!
Size: 3.65 MB
Language: en
Added: Feb 03, 2025
Slides: 5 pages
Slide Content
www.1stepgrow.com
NUMPY BASICS
PYTHON FORPYTHON FOR
DATA SCIENCEDATA SCIENCE
CHEAT SHEET PART- 4
www.1stepgrow.com
>>> i = np.transpose(b)
>>> b.ravel()
>>> h.resize((2,6))
>>> g.reshape(3,-2)
>>> np.append(h,g)
>>> np.delete(a,[1])
>>> i.T
Permute array dimensions
Flatten the array
Return a new array with
shape (2,6)
Reshape, but donβt change
data
Append items to an array
Delete items from an array
Permute array dimensions
Array Manipulation
Transposing Array
Changing Array Shape
Adding/Removing Elements