I always heard: “NumPy is faster than Python lists.” But today, I tested it myself 👇 Day 8 of my Data Science Journey 🚀: I added 1,000,000 elements using: 🔹 Python lists 🔹 NumPy arrays 📊 Result? NumPy was significantly faster. 💡 Why this happens: NumPy uses vectorized operations and runs on optimized C code, avoiding slow Python loops. 👉 This is why NumPy is the backbone of Data Science & Machine Learning. Small step today, but building real understanding. #DataScience #Python #NumPy #LearningInPublic #Day8
NumPy vs Python Lists: Speed Comparison
More Relevant Posts
-
🐍 Exploring NumPy Basics in Python Today I practiced core NumPy operations to understand how numerical computing works in Python. ✔ Converted Python lists into NumPy arrays ✔ Created arrays using np.array() ✔ Generated sequences with np.arange() and np.linspace() ✔ Built matrices using np.zeros(), np.ones(), and np.eye() ✔ Worked with random numbers using np.random.rand() and np.random.randint() ✔ Performed basic array operations like max(), min(), and reshape() 💡 Key takeaway: NumPy is powerful for handling large datasets and is the foundation for Data Science and Machine Learning in Python. 📌 Full code available here: 👉https://lnkd.in/dCMhYQey Next step: I will explore array indexing, slicing, and basic statistical operations. #Python #NumPy #DataScience #MachineLearning #100DaysOfCode #LearningJourney
To view or add a comment, sign in
-
Transform every list in a Polars column with one vectorized expression ⚡ When working with list columns, most people reach for apply with a Python lambda that loops over every list row by row. That approach breaks vectorization, so performance quickly degrades as the dataset grows. Polars solves this with list.eval, which runs a full expression against each list using pl.element() and stays fully vectorized. Key benefits: • Vectorized per-element transformations without Python loops • Support for a wide range of expressions, including aggregations like max, mean, and sum • Composable with other Polars expressions for clean, readable pipelines 🚀 Article comparing pandas, polars, and DuckDB: https://bit.ly/3Ppi2OG #Python #DataScience #DataEngineering
To view or add a comment, sign in
-
-
Real data is never clean. Save this cheat sheet for the next time you are dealing with messy text columns. 12 pandas string functions. Grouped by what they actually do. Clean it. Find it. Transform it. Validate it. Follow Everyday Data People for a cheat sheet every day. #Python #Pandas #DataCleaning #DataScience #DataAnalytics #EverydayDataPeople
To view or add a comment, sign in
-
-
Day 1 — Pandas Basics (No Theory, Just Skills) Stop watching tutorials. Start doing. Today you learned: • How to load real data • How to explore it fast • How to filter what actually matters This is what real data work looks like — not slides, not notes. Tomorrow: Cleaning messy data (where most beginners fail) #DataScience #Python #Pandas #LearnToCode #CodingJourney
To view or add a comment, sign in
-
-
🚀 Day by Day Learning Data Analysis with Python & Pandas Today’s practice session included: ✔️ Understanding DataFrame structure ✔️ Checking column data types ✔️ Using df.info() ✔️ Learning iloc[] indexing ✔️ Finding missing values with isnull().sum() Small daily practice = Big future skills 💻📊 From confusion to confidence… slowly becoming better in Python & Data Analysis every day. 🔥 #Python #Pandas #DataAnalysis #LearningPython #CodingJourney #JupyterNotebook #DataScience #BeginnerToPro #100DaysOfCode #ProgrammerLife
To view or add a comment, sign in
-
-
Attending SQLBits today? ⏰ 12:30 PM - don’t miss “Python in Microsoft Fabric: Execution Options and Scaling.” Matt Collins breaks down how to run and scale Python in Fabric - fast, practical, and straight to the point. If you’re working in data or analytics, this one’s worth your time. See you there. #SQLBits #MicrosoftFabric #Python #DataEngineering #Analytics
To view or add a comment, sign in
-
-
If your idea of data analysis is clicking filters in Excel and hoping for the best… we should talk 😅 Public health datasets are chaotic enough, your workflow doesn’t need to be. A few lines of Python can do in seconds what takes way too many clicks (and re-clicks) to get right manually, and it’s actually repeatable. Same filter. Every time. No guessing what you did last time. This Learn with Lantana breaks it down 👇 #LantanaConsultingGroup #LearnWithLantana #Python #PublicHealth #HealthData #DataAnalytics
To view or add a comment, sign in
-
Welcome 👋 Ever thought of turning your plots into visually stunning stories instead of plain charts? Here’s a simple trick: add an image as a background in your plots using Python and elevate your data visualization instantly. 📊✨ Small tweaks like this can make your work stand out and grab attention. If you're exploring data science, don’t just analyze present it beautifully. 👉 Try this out in your next project and see the difference! 👉 Follow for more practical Python & data tips. #Python #DataScience #DataVisualization #MachineLearning #CodingTips #Matplotlib #NumPy #LearnToCode #TechSkills #Programming
To view or add a comment, sign in
-
-
Instead of just importing scikit-learn I wanted to truly understand the math and logic under the hood. So, I started building core ML algorithms entirely from scratch in pure Python. I made an implementation of DBSCAN( Outlier detection) without external libraries . If you want to see how the clustering logic actually works, check out the code here: 🔗 https://lnkd.in/g45Z5BqC Thanks to my professor Dr Ramesh Athe who really helped me to understand this concepts.
To view or add a comment, sign in
-
🚀 Just dropped a new video in my Pandas Series! If you’ve ever felt confused about what Pandas actually is, this one is for you. In this video, I break it down in a simple way: 📊 What Pandas is 📊 What a DataFrame means 📊 A real Python code example 📊 And how it’s used in real-life data scenarios Most beginners struggle because they jump straight into code without understanding the why. This video fixes that. Whether you're a beginner in data science or brushing up Python for interviews, this is a must-watch. 🎥 Watch it here: https://lnkd.in/gFtVuiJ2 Let me know in the comments: Have you used Pandas before or are you just getting started? #Python #Pandas #DataScience #MachineLearning #DataAnalysis #Programming #LearnPython #Coding #TechLearning
To view or add a comment, sign in
-