हिंदी

Kavyanjali, a chemical analyst, needs to arrange data of few elements in the form of two series containing symbols and their atomic numbers respectively. Thereafter, the data of these two series - Informatics Practices

Advertisements
Advertisements

प्रश्न

Kavyanjali, a chemical analyst, needs to arrange data of few elements in the form of two series containing symbols and their atomic numbers respectively. Thereafter, the data of these two series has to be arranged and displayed in the form of Data Frame as shown below:

  Symbol Atomic Number
Hydrogen H 1
Helium He 2
Lithium Li 3
Beryllium Be 4

Help her in writing suitable Python code to complete the task.

कोड लेखन

उत्तर

d = {'Symbol':pd.Series(['H','He','Li','Be'],['Hydrogen','Helium','Lithium','Beryllium']),
'Atomic No': pd.Series([1,2,3,4],['Hydrogen','Helium','Lithium','Beryllium'])} 
df=pd.DataFrame(d)
shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
2022-2023 (March) Set 4
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×