To load a JSON file directly into a DataFrame (assuming records are at the top level):
To compute the mean AND maximum of a “revenue” column within…
To compute the mean AND maximum of a “revenue” column within each group:
A left merge of customers (1,000 rows) with orders (3,000 ro…
A left merge of customers (1,000 rows) with orders (3,000 rows) returns 4,500 rows. The most likely explanation:
You merge customers (1,000 rows) with orders (5,000 rows) us…
You merge customers (1,000 rows) with orders (5,000 rows) using how=”left”. The result has 6,200 rows. What is most likely?
Which function counts unique values per group?
Which function counts unique values per group?
To merge two DataFrames where the customer ID column has dif…
To merge two DataFrames where the customer ID column has different names (cust_id in one, customer in the other), use:
In str.contains applied to a column with NaN values, why pas…
In str.contains applied to a column with NaN values, why pass na=False?
A categorical column (“region”) has 5% missing values and th…
A categorical column (“region”) has 5% missing values and the rest are roughly evenly distributed across four categories. Which strategy is most defensible?
The standard recommended Plotly continuous colormap (percept…
The standard recommended Plotly continuous colormap (perceptually uniform, colorblind-friendly):
Trailing/leading whitespace in a string column is most clean…
Trailing/leading whitespace in a string column is most cleanly removed with: