𝐂𝐒𝐕 𝐟𝐢𝐥𝐞 → 𝐃𝐚𝐭𝐚𝐅𝐫𝐚𝐦𝐞 → 𝐈𝐧𝐝𝐞𝐱𝐢𝐧𝐠 𝐚𝐧𝐝 𝐬𝐞𝐥𝐞𝐜𝐭𝐢𝐧𝐠 𝐝𝐚𝐭𝐚. This is Day 4 of #1000DaysOfLearning Yesterday I practiced querying with conditions. Today I learned how indexing works in DataFrames. I understood that the index is separate from columns. Once a column is set as an index, it becomes a row label and still appears on the left even after selecting specific columns. Understanding indexing makes querying feel cleaner. #Python #Pandas #DataScience #LearningInPublic #1000DaysOfLearning
DataFrame Indexing and Selection with Python
More Relevant Posts
-
𝐌𝐞𝐬𝐬𝐲 𝐜𝐨𝐥𝐮𝐦𝐧 𝐧𝐚𝐦𝐞𝐬. 𝐄𝐱𝐭𝐫𝐚 𝐬𝐩𝐚𝐜𝐞𝐬. 𝐌𝐢𝐱𝐞𝐝 𝐔𝐏𝐏𝐄𝐑𝐂𝐀𝐒𝐄 𝐚𝐧𝐝 𝐥𝐨𝐰𝐞𝐫𝐜𝐚𝐬𝐞. 𝐒𝐨𝐮𝐧𝐝 𝐟𝐚𝐦𝐢𝐥𝐢𝐚𝐫? These 12 Python string methods can fix all of that — sometimes in just one line of code. While learning Python for data analytics, I realized that small string methods like .𝐬𝐭𝐫𝐢𝐩(), .𝐥𝐨𝐰𝐞𝐫(), .𝐫𝐞𝐩𝐥𝐚𝐜𝐞(), .𝐬𝐩𝐥𝐢𝐭(), 𝐚𝐧𝐝 .𝐣𝐨𝐢𝐧() are extremely useful for cleaning text data before analysis. Strong fundamentals make advanced work easier. #Python #DataAnalytics #DataCleaning #PythonForDataAnalysis #LearningPython #AspiringDataAnalyst #PythonTips #DataScience #CodingJourney
To view or add a comment, sign in
-
-
In this video, I’ve explained how to create and use APIs using FastAPI in a simple way. I covered: What FastAPI is and how it works How to create an API endpoint How to convert data into an API response How to fetch data from the API using Python How to convert that data into a pandas DataFrame This is a basic concept used in real-world data pipelines and machine learning workflows. #Python #FastAPI #APIs #DataScience
To view or add a comment, sign in
-
✅Day 9 – For Loops in Python Today I learned about For Loops in Python. A for loop allows us to repeat a task multiple times automatically. ✅Example: numbers = [10, 20, 30] for num in numbers: print(num) This loop prints each value from the list one by one. ✅Why This Matters in Data Analytics -- In real-world data analysis, we often need to: -- Process large datasets -- Perform repeated calculations -- Apply the same operation to many values -- Loops help automate these repetitive tasks efficiently. ✅Today's takeaway: Automation is a key skill in data analytics, and loops make it possible. #Python #DataAnalytics #LearningJourney #BusinessAnalytics #Consistency
To view or add a comment, sign in
-
-
𝐀 𝐬𝐦𝐚𝐥𝐥 𝐭𝐡𝐢𝐧𝐠 𝐢𝐧 𝐩𝐚𝐧𝐝𝐚𝐬 𝐭𝐡𝐚𝐭 𝐬𝐚𝐯𝐞𝐝 𝐚 𝐥𝐨𝐭 𝐨𝐟 𝐭𝐢𝐦𝐞 While working with a dataset in Python today, I came across something simple but very useful — value_counts() in pandas. Instead of writing multiple filters or loops just to see how frequently different values appear in a column, value_counts() gives a quick frequency breakdown instantly. For example, if you want to see how many records belong to each category, city, or product type, one line can show the entire distribution. It’s a small function, but it makes exploring a new dataset much faster. Slowly realizing that data analysis is really about knowing these small but powerful tools. #Python #Pandas #DataAnalytics #LearningJourney
To view or add a comment, sign in
-
📌 Using Indexing in Pandas Series Pandas Series allows us to assign custom labels (index) to each value. These labels help in identifying and accessing data easily. By specifying an index, we can associate values with meaningful labels instead of relying only on numerical positions. When performing operations between two Series, Pandas automatically aligns data based on their index labels. This makes data manipulation more intuitive and powerful. Indexing is a key feature in Pandas that helps manage and analyze structured data efficiently. #Python #Pandas #DataAnalytics #DataScience #LearningPython
To view or add a comment, sign in
-
-
Data analysis often goes wrong before the analysis even begins. The ingestion step: where data is pulled from databases, web sources, and APIs: is where silent errors go undetected. Duplicates, nulls, schema mismatches. Episode 3 of the Practical Learning Series covers the patterns, the validation checklist, and the mistakes to avoid. Because reliable analysis starts with trustworthy data. Swipe through → #DataScience #Python #PracticalLearning #Analytics #DataManagement #DataScienceInstitute
To view or add a comment, sign in
-
Return a #Python #Pandas data frame's index to a regular column with reset_index: df = df.reset_index() • 1-column index? It's now a regular column. • Multi-index? Its columns are all regular columns. reset_index returns a new data frame. It doesn't modify the original.
To view or add a comment, sign in
-
-
📌 Day 49 of #100DaysOfLeetCode 🔹 Problem: Contains Duplicate II (LeetCode 219) 💡 Problem Statement: Given an integer array nums and an integer k, return true if there are two distinct indices i and j in the array such that: nums[i] == nums[j] |i - j| ≤ k In simple words, check if the same number appears again within k distance in the array. ⚙ Approach: Use a HashMap (dictionary) to store the last index of each number. Traverse the array once. If the number already exists in the map: Check the distance between indices. If distance ≤ k, return True. Update the index of the number in the map. ⏱ Complexity: Time Complexity: O(n) Space Complexity: O(n) 🎯 Key Learning: Hashing helps track previously seen elements efficiently and allows solving duplicate problems in linear time instead of nested loops. #LeetCode #DSA #Python #HashMap #CodingChallenge #100DaysOfCode #ProblemSolving
To view or add a comment, sign in
-
-
Day 1 – Rebuilding Python Fundamentals from Scratch 🚀 Today I focused on deeply understanding variables and core numeric behavior in Python. Here’s what I covered: • Variables are references to objects in memory, not boxes storing values • Core data types: int, float, str, bool • Type casting and why int(x) doesn’t modify the original variable unless reassigned • Difference between / (true division) and // (floor division) • Why floor division moves LEFT on the number line for negative numbers • The mathematical identity behind modulus: a = (a // b) * b + (a % b) • Why -17 % 4 = 3 (not -1) • Why id(x) == id(y) can return True due to small integer interning Big insight: Understanding memory behavior and arithmetic rules removes confusion and prevents hidden bugs. Focusing on strong foundations before moving ahead. On to Day 2 💪 #Python #DataScience #MachineLearning #SoftwareEngineering #LearningInPublic
To view or add a comment, sign in
-
-
Building a simple data ingestion API using FastAPI. The idea is simple: • Upload a dataset (CSV) • Parse it using pandas • Automatically inspect columns • Return metadata like data types and missing values It’s interesting how quickly useful APIs can be built with FastAPI. Next step: adding querying and simple data exploration endpoints. Learning by building. #Python #FastAPI #BackendDevelopment #DataEngineering #BuildInPublic
To view or add a comment, sign in
-
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development
That’s a solid list of fundamentals Divyansh Sharma . Getting comfortable with to_datetime conversions and Regex early on will save you countless hours during your projects. It’s also interesting to see your note on how the index behaves—understanding those row labels versus columns is crucial for efficient querying later on. Great progress