You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The notebook introduces basic DataFrame operations but can be expanded to showcase a wider range of common manipulations, including handling missing data and more complex filtering.
Examples
The notebook could include examples of:
Handling missing data with methods like dropna() and fillna()
More complex boolean indexing with multiple conditions
The use of the .query() method for filtering
Demonstrating .apply() for applying a function to rows/columns
Proposed Change
Add new content sections demonstrating the above operations.
Provide additional context as to why these operations are useful in data analysis.
Include best practice tips, such as avoiding in-place modifications when exploring data.
Example Implementation
# Handling missing datadf_cleaned=df.dropna() # Drops rows with any missing valuesdf_filled=df.fillna(method='ffill') # Forward-fill missing values# Complex boolean indexinghigh_quality_red=df[(df['quality'] >7) & (df['color'] =='red')]
# Using .query() for filteringhigh_quality_red_query=df.query("quality > 7 and color == 'red'")
# Applying a function with .apply()df['quality_label'] =df['quality'].apply(lambdax: 'high'ifx>7else'low')
The text was updated successfully, but these errors were encountered:
Issue Description
The notebook introduces basic DataFrame operations but can be expanded to showcase a wider range of common manipulations, including handling missing data and more complex filtering.
Examples
The notebook could include examples of:
dropna()
andfillna()
.query()
method for filtering.apply()
for applying a function to rows/columnsProposed Change
Example Implementation
The text was updated successfully, but these errors were encountered: