๐ฅ Pandas Interview Q&A (Frequently Asked ๐ฅ)
๐ Q1. What is Pandas and why is it used?
๐ Python library for data manipulation & analysis
๐ Provides powerful data structures like DataFrame & Series
๐ Used for cleaning, transforming, and analyzing data
๐ Q2. What is the difference between Series and DataFrame?
๐ Series โ 1D labeled array (single column)
๐ DataFrame โ 2D tabular structure (rows & columns)
๐ DataFrame is a collection of multiple Series
๐ Q3. How do you handle missing values in Pandas?
๐ isnull() / notnull() to detect missing values
๐ fillna() to replace missing data
๐ dropna() to remove missing records
๐ Q4. What is the difference between loc[] and iloc[]?
๐ loc[] โ Label-based indexing
๐ iloc[] โ Integer position-based indexing
๐ Use loc for named indexes, iloc for numeric positions
๐ Q5. What is groupby() in Pandas?
๐ Used for splitting data into groups
๐ Apply aggregation functions (sum, mean, count)
๐ Essential for data summarization
๐ Q6. What is the difference between merge() and concat()?
๐ merge() โ SQL-like joins (inner, left, right, outer)
๐ concat() โ Stacks data vertically or horizontally
๐ Use merge for relational data combining
๐ Q7. How do you filter data in Pandas?
๐ Use boolean conditions (df[df['col'] > value])
๐ Multiple conditions using & and |
๐ Helps in extracting specific insights
๐ Q8. What is apply() function?
๐ Applies a function across rows or columns
๐ Used for custom transformations
๐ More flexible than built-in functions
๐ฅ React with โฅ๏ธ for more such questions
Post #2141
1.57K
- โค 3