AppliedMultiple choice
You add two pandas Series with partly different indexes. What do you get?
- AThe union of the indexes, with NaN wherever either side is missing
- BThe intersection of the indexes
- CPositional addition, ignoring the indexes
- DAn error, since the indexes differ
The worked solution is in Premium
The answer, the full working and the one idea to take away – for this and all 1,322 questions in the bank. Answer it in practice and your working is marked, with a known mistake named when you make one.
Learn the method
Reported in interviews at
Citadel Securities, Two Sigma, Hudson River Trading, Jump Trading
More python and data for quants questions
- A US equity session runs 6.5 hours. How many five-minute bars does it contain?Foundation
- What does pd.Series([1, None, 3]).mean() return?Foundation
- For prices 100,110,99, what is the last value of pct_change()?Foundation
- A Series has 10 values. How many non-missing values does s.rolling(3).mean() contain?Foundation
- A signal that sees the future, part 1 of 3Foundation
- You compute a feature with df.rolling(21, center=True).mean().Applied