Print
Read It: Loss Functions, Epochs, and Computing Validation
Insert text to introduce video below
Enter image credit here
Watch It: Video - ( minutes) REPLACE WITH Loss Function, Epochs, and Computing Validation VIDEO
Try It: OPTION 1 GOOGLE COLAB
- Click the Google Colab file used in the video here.
- Go to the Colab file and click "File" then "Save a copy in Drive", this will create a new Colab file that you can edit in your own Google Drive account.
- Once you have it saved in your Drive, try to implement the following code to import a file of your choice by mounting your Google Drive:
Note: You must be logged into your PSU Google Workspace in order to access the file.
from google.colab import drive drive.mount('/content/drive') import pandas as pd df = pd.read_csv('yourfilename.csv') df # print the dataframe
Once you have implemented this code on your own, come back to this page to test your knowledge.
OPTION 2 : DATACAMP
Try It: OPTION 2 DataCamp - Apply Your Coding Skills
Dictionaries are a quick way to create a variable from scratch. However, their functionality is limited, so we will often want to convert those dictionaries into DataFrames. Try to code this conversion in the cell below. Hint: Make sure to import the Pandas library.
# This will get executed each time the exercise gets initialized.
# Create a Simple Dictionary
mydict = {'Name':['Amy', 'Bob', 'Clair', 'Daisy'],
'Birthday':['9/3/1991', '4/21/1988', '4/21/1990', '11/11/1989'],
'Age':[31, 34, 32, 33]}
# convert the dictionary to a DataFrame
# print the values in the 'Birthday' column
# Create a Simple Dictionary
mydict = {'Name':['Amy', 'Bob', 'Clair', 'Daisy'],
'Birthday':['9/3/1991', '4/21/1988', '4/21/1990', '11/11/1989'],
'Age':[31, 34, 32, 33]}
# convert the dictionary to a DataFrame
import pandas as pd
mydataframe = pd.DataFrame(mydict)
# print the values in the 'Birthday' column
mydataframe['Birthday']