import pandas as pd examclub = pd.read_csv("exama.csv") examclub.info() 0 1 2 3 4 Give the following dataframe(examclub), write the statements that will complete the following dataset memory optimization. RangeIndex: 10 entries, 0 to 9 Data columns (total 6 columns): # Column 1. Set the "Member Join Date" to a date object. 2. Set any Dues Paid and Dues Owed NaN values to zeros. Then set them to floats. 3. Show the unique column values, then set Club Use and Member Level to categories. 4. Display the sum of the Dues Paid. 5. Display all members that are Gold Member Level. 6. Display all member that are Silver Member level and Club use is Pool. 7. Display all members that are Gold and Silver member levels. Use the isin method. 8. Display all members that Dues Paid is between 2500 and 6000. 0 1 5 Dues Owed 234 Member Name Member Level Dues Paid Member Join Date 10 non-null Club Use 10 non-null 10 non-null 10 non-null 10 non-null 10 non-null examclub.head() dtypes: int64(2), object(4) memory usage: 608.0+ bytes Non-Null Count Dtype ---- 1/1/2020 1/2/2020 1/3/2020 2/1/2020 3/2/2020 Member Join Date Club Use object object object object int64 int64 Member Name Member Level Dues Paid Dues Owed Gold 5250 456 Silver 4406 1200 Bronze 8661 300 Silver 7075 100 Bronze 2524 2000 Tim Berners-Lee Pool Pool Leonard Kleinrock Golf Charles Babbage Golf Konrad Zuse Spa Steve Wozniak

icon
Related questions
Question
0
1
import pandas as pd
examclub = pd.read_csv ("exama.csv")
examclub.info()
2
3
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 10 entries, 0 to 9
Data columns (total 6 columns):
#
Column
Give the following dataframe(examclub), write the statements that will complete the following dataset
memory optimization.
1. Set the "Member Join Date" to a date object.
2. Set any Dues Paid and Dues Owed NaN values to zeros. Then set them to floats.
3. Show the unique column values, then set Club Use and Member Level to categories.
4. Display the sum of the Dues Paid.
1
5. Display all members that are Gold Member Level.
6. Display all member that are Silver Member level and Club use is Pool.
7. Display all members that are Gold and Silver member levels. Use the isin method.
8. Display all members that Dues Paid is between 2500 and 6000.
2
3
examclub.head()
Member Name
Member Level
Dues Paid
Member Join Date 10 non-null
club Use
10 non-null
4
5 Dues Owed
dtypes: int64(2), object(4)
memory usage: 608.0+ bytes
Non-Null Count Dtype
---
1/1/2020
1/2/2020
1/3/2020
2/1/2020
3/2/2020
10 non-null
10 non-null
10 non-null
10 non-null
Member Join Date Club Use
object
object
object
object
int64
int64
Member Name Member Level Dues Paid Dues Owed
Gold
5250
456
Silver
4406
1200
Bronze
8661
300
Silver
7075
100
Bronze
2524
2000
Pool Tim Berners-Lee
Pool Leonard Kleinrock
Golf Charles Babbage
Golf
Konrad Zuse
Spa
Steve Wozniak
Transcribed Image Text:0 1 import pandas as pd examclub = pd.read_csv ("exama.csv") examclub.info() 2 3 <class 'pandas.core.frame.DataFrame'> RangeIndex: 10 entries, 0 to 9 Data columns (total 6 columns): # Column Give the following dataframe(examclub), write the statements that will complete the following dataset memory optimization. 1. Set the "Member Join Date" to a date object. 2. Set any Dues Paid and Dues Owed NaN values to zeros. Then set them to floats. 3. Show the unique column values, then set Club Use and Member Level to categories. 4. Display the sum of the Dues Paid. 1 5. Display all members that are Gold Member Level. 6. Display all member that are Silver Member level and Club use is Pool. 7. Display all members that are Gold and Silver member levels. Use the isin method. 8. Display all members that Dues Paid is between 2500 and 6000. 2 3 examclub.head() Member Name Member Level Dues Paid Member Join Date 10 non-null club Use 10 non-null 4 5 Dues Owed dtypes: int64(2), object(4) memory usage: 608.0+ bytes Non-Null Count Dtype --- 1/1/2020 1/2/2020 1/3/2020 2/1/2020 3/2/2020 10 non-null 10 non-null 10 non-null 10 non-null Member Join Date Club Use object object object object int64 int64 Member Name Member Level Dues Paid Dues Owed Gold 5250 456 Silver 4406 1200 Bronze 8661 300 Silver 7075 100 Bronze 2524 2000 Pool Tim Berners-Lee Pool Leonard Kleinrock Golf Charles Babbage Golf Konrad Zuse Spa Steve Wozniak
Expert Solution
steps

Step by step

Solved in 7 steps with 2 images

Blurred answer