Notes
Notes - notes.io |
• Create a series named heights A with values 176.2, 158.4, 167.6, 156.2, and 161.4. These values represent the heights of 5 students of class A.
• Label each student as s1, s2, s3, s4, and s5.
. Print the second element of series heights_A.
Note: Use index number or the value corresponding to the second element inside square brackets.
Task 2
• Print the middle three elements of Series heights A.
Note: Use slice objects corresponding to index numbers or index values.
Task 3
• Create another series named weights_A with values 85.1, 90.2, 76.8, 80.4, and 78.9. These values represent the weights of 5 students of class A.
• Label each student as s1, s2, s3, s4, and s5.
• Create a dataframe named df_A, which contains the height and weight of five students namely s1, s2, s3, s4 and s5.
• Label the columns as Student_height and Student_weight, respectively.
• Select the column df_A referring to student heights, and store it in the variable height. Note: Specify the required column name inside. square brackets.
• Print the type of object of the variable height.
Task 4
• Select the rows corresponding to students s1, s2 of df_A, and capture them in another dataframe df_s1s2. Note: Use either .loc or .iloc methods.
• Print the dataframe df_s1s2.
Task 5
• Select the rows corresponding to students s1, s2 and s5 of df_A in the order s2, s5, s1, and capture them in another dataframe df_s2s5s1.
Note: Make use of either .loc or .iloc methods.
• Print the dataframe df_s2s5s1
Task 6
• Select those rows of df A whose index values end with 1 or 4, and capture them in another dataframe df_s1s4. Note: Pass a boolean function which checks if an index string ends with 1 or 4 to .loc or .iloc methods.
• Print the dataframe df_s1s4.
|
Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 12 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team