हिंदी

Create a series having names of any five famous monuments of India and assign their States as index values.

Advertisements
Advertisements

प्रश्न

Create a series having names of any five famous monuments of India and assign their States as index values.

कोड लेखन
Advertisements

उत्तर

import pandas as pd
Monuments = pd.Series
(
    ['Taj Mahal', 'Gateway of India', 'Qutub Minar', 'Hawa Mahal', 'Konark Sun Temple'],
    index=['Uttar Pradesh', 'Maharashtra', 'Delhi', 'Rajasthan', 'Odisha']
)
print(Monuments)

Output:

Uttar Pradesh Taj Mahal
Maharashtra Gateway of India
Delhi Qutub Minar
Rajasthan Hawa Mahal
Odisha Konark Sun Temple
dtype object
shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 2: Data Handling using Pandas - I - Intext Questions [पृष्ठ ३०]

APPEARS IN

एनसीईआरटी Informatics Practices [English] Class 12
अध्याय 2 Data Handling using Pandas - I
Intext Questions | Q 1. | पृष्ठ ३०
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×