मराठी

Create the following series and do the specified operation: Vowels, having 5 elements with index labels ‘a’, ‘e’, ‘i’, ‘o’ and ‘u’ and all the five values set to zero. Check if it is an empty series.

Advertisements
Advertisements

प्रश्न

Create the following series and do the specified operation:

Vowels, having 5 elements with index labels ‘a’, ‘e’, ‘i’, ‘o’ and ‘u’ and all the five values set to zero. Check if it is an empty series.

कोड लेखन
Advertisements

उत्तर

import pandas as pd
Vowels = pd.Series([0, 0, 0, 0, 0], index=['a', 'e', 'i', 'o', 'u'])
print(Vowels)
print(Vowels.empty)

Output:

a 0
e 0
i 0
o 0
u 0
dtype int64
shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 2: Data Handling using Pandas - I - Exercise [पृष्ठ ६०]

APPEARS IN

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

Englishहिंदीमराठी


      Forgot password?
Use app×