मराठी

How Series is Different from 1-D Array, List, and Dictionary

Advertisements
Advertisements

प्रश्न

How Series is Different from 1-D Array, List, and Dictionary

फरक स्पष्ट करा
Advertisements

उत्तर

  • 1-D Array: A NumPy 1-D array only uses default numeric positions (0, 1, 2...) to find data, while a Series allows you to use custom text labels as indices. Additionally, an array must hold the exact same data type, whereas a Series is more flexible with mixed data types.
  • List: A Python list only allows position-based indexing and cannot handle direct mathematical operations (e.g., multiplying a list by 2 duplicates the items instead of doubling the numbers). A Series is optimised for data analysis and allows instant, direct math operations across all elements without loops.
  • Dictionary: A dictionary cannot contain duplicate keys, whereas a pandas Series allows duplicate index labels. Furthermore, a series always maintains a strict sequential order and supports fast, column-wide mathematical operations that dictionaries cannot do easily.
shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 2: Data Handling using Pandas - I - Exercise [पृष्ठ ६०]

APPEARS IN

एनसीईआरटी Informatics Practices [English] Class 12
पाठ 2 Data Handling using Pandas - I
Exercise | Q 1. b | पृष्ठ ६०
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×