Question
1.
2.
3.
4.
Answer (Detailed Solution Below)
Option 1 : 0, 1, 2 — a RangeIndex starting at 0 / 0 से शुरू होने वाला RangeIndex (0, 1, 2)
Advertisement
Detailed Solution
सही उत्तर 0, 1, 2 — a RangeIndex starting at 0 / 0 से शुरू होने वाला RangeIndex (0, 1, 2) है।
Key Points
Helpful?
Question:
What is the index of the DataFrame created by pd.DataFrame({'x': [10, 20, 30]})? / pd.DataFrame({'x': [10, 20, 30]}) से बने DataFrame का इंडेक्स क्या होगा?
1.
0, 1, 2 — a RangeIndex starting at 0 / 0 से शुरू होने वाला RangeIndex (0, 1, 2)
2.
1, 2, 3 — an index starting at 1 / 1 से शुरू होने वाला इंडेक्स (1, 2, 3)
3.
'x' — the column name becomes the index / कॉलम नाम 'x' ही इंडेक्स बन जाता है
4.
No index is assigned / कोई इंडेक्स नहीं बनता
Correct Answer: 0, 1, 2 — a RangeIndex starting at 0 / 0 से शुरू होने वाला RangeIndex (0, 1, 2)
When no index is supplied, pandas assigns a RangeIndex beginning at 0, so three rows get labels 0, 1 and 2. / इंडेक्स न देने पर pandas 0 से शुरू होने वाला RangeIndex देता है, अतः तीन पंक्तियों को 0, 1, 2 लेबल मिलते हैं।
Downloaded from PrepSnap (prepsnap.in)