Advertisements
Advertisements
प्रश्न
When two Pandas Series with different indices are added, the result is ______.
पर्याय
Error occurs
Indices are ignored, and elements are added in order.
The result has all indices, with missing values filled as NaN.
Only the common indices are retained in the result.
MCQ
Advertisements
उत्तर
The result has all indices, with missing values filled as NaN.
Explanation:
When two Pandas Series with different indices are added, Pandas aligns the data by index labels. If an index is missing in one Series, the result for that index becomes NaN (Not a Number). Thus, the output contains all indices from both series, and missing values are replaced with NaN.
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
