Skip to content

hsma-programme/h6_1f_python_part_2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

This repository contains the materials for HSMA 6 Session 1F - Python Programming part 1

The notebooks in the h6_1f_python_part_2 can be downloaded and run locally if you have Python installed.

Alternatively, you can run each exercise on Google Colab, a free online platform for coding exercises. You will need to be logged in to a google account in your browser.

Using the links below will open a fresh copy of the notebook to work on - your changes will not be visible to anyone else. However, if you want to be able to refer back to your version of the notebook in future, make sure you click 'File --> Save to Drive'. Your changes will then be saved to your own account, and you can access your edited copy of the notebook from https://colab.research.google.com/.

Note: when you first run a cell, you will need to click 'run anyway' in the popup that appears. This is a standard pop-up that appears for any notebook you haven't created from scratch yourself!


Open Exercise 1 in Google Colab: Open In Colab


Open Exercise 2 in Google Colab: Open In Colab

Hint: To access the file input_data.csv in colab, you will need to upload it to Google Colab.

image

  1. Click on 'files' in the left hand bar in Google colab (the folder-shaped icon)
  2. Choose 'upload to session storage'
  3. Select the file 'input_data.csv' from your machine. You can download it if required - right click on this link and choose 'save file as'
  4. Click 'ok' if a warning message appears. input_data.csv should now appear in your list of files. Hover over it and three dots will appear - click on these.
  5. Choose 'copy path' to get the filepath of the csv file. You can then right click and choose 'paste' in a code cell to get the filepath you will need in your code.

Open Exercise 3 in Google Colab: Open In Colab


Open Exercise 4 in Google Colab: Open In Colab

Hint: If running exercise 4 in Google Colab, you can point towards the titanic dataset csv on the HSMA repository. The following will work:

pd.read_csv("https://raw.githubusercontent.com/hsma-programme/h6_1f_python_part_2/main/1f_python_programming_part_2/titanic_dataset.csv",
            #INSERT THE REST OF YOUR IMPORT CODE HERE)

About

Materials for HSMA 6 Session 1F

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published