Untitled

mail@pastecode.io avatar
unknown
python
15 days ago
369 B
6
Indexable
Never
import pandas as pd
import numpy as np

df = pd.read_csv('/datasets/vg_sales.csv')

def score_group(score):
    if score < 60:
        return 'low'
    elif score < 80:
        return 'medium'
    elif score >= 80:
        return 'high'
    else:
        return 'no score'

print(score_group(10))
print(score_group(65))
print(score_group(99))
print(score_group(np.nan))
Leave a Comment