NumPy Tutorial for Beginners: Arrays, Maths and Filtering in Python
Ravindra Bagale's Tip — Chala mitrano
pandas is built on NumPy. Today we take our first steps: arrays, fast maths on whole columns, and filtering with True/False. After this, pandas will feel familiar.
Ravindra Bagale's Tip – चला मित्रांनो
pandas हा NumPy वर उभा आहे. आज पहिली पावलं टाकू: arrays, संपूर्ण column वर जलद गणित आणि True/False ने filtering. यानंतर pandas ओळखीचा वाटेल.
Ravindra Bagale's Tip – चलो दोस्तों
pandas, NumPy पर बना है. आज पहले कदम रखेंगे: arrays, पूरे column पर तेज़ गणित और True/False से filtering. इसके बाद pandas जाना-पहचाना लगेगा.
What you will learn in this chapter
- Why NumPy is faster than lists
- Create arrays and check shape and dtype
- Maths on a whole array at once
- Summary statistics
- Filtering with boolean masks
- 2D arrays — rows and columns
Practice data
All names, shops, banks, hospitals and amounts in this chapter are made up for learning. They are not real people or real company numbers.
Concepts in this chapter
- P12.1What Is NumPy and Why Use It Instead of Lists
- P12.2How to Create NumPy Arrays: array, arange, zeros, linspace
- P12.3NumPy Array Maths: Add, Multiply and Compare Whole Arrays
- P12.4NumPy Statistics: sum, mean, median, min, max, std
- P12.5NumPy Boolean Indexing: Filter Arrays with Conditions
- P12.6NumPy 2D Arrays: Rows, Columns and Axis