mcmol / learning_python

0 stars 0 forks source link

remove unused functions from notebook #1

Closed sandervandorsten closed 4 years ago

sandervandorsten commented 4 years ago

(This is not a real problem but I'm just nitpicking for learning purposes of you getting a code review + having to resolve a github issue)

Hi Marriette,

I've reviewed your code in iris_classifier_knn.ipynb. Structure and code look good and understandable! I have a small suggestion.

You have a cell with some functions which you don't use. I think you can safely remove them from the code to improve clarity and readability later on. I've added the functions below; i think change_dtypes and preprocess_columns don't do too much.

Let me know if you agree that they can be removed. We can close the issue once it has been removed; or we've come to a different agreement.

def filter_columns(dataf):
    keep_columns = [
        "Id",
        "SepalLengthCm",
        "SepalWidthCm",
        "PetalLengthCm",
        "PetalWidthCm",
        "Species"
    ]
    return dataf[keep_columns]

def change_dtypes(dataf):
    return dataf

def preprocess_columns(dataf):
    return dataf
mcmol commented 4 years ago

Hi Sander,

I agree with your statement. As you suggested I removed the unused functions from iris_classifier_knn.ipynb.

sandervandorsten commented 4 years ago

Thanks, looks good!