I've been stuck with this problem for a while. I have a dataset which looks more or less like this:
Students Subject Mark
1 M F 7 4 3 7
2 I 5 6
3 M F I S 2 3 0
4 M 2 2
5 F M I 5 1
6 I M F 6 2 3
7 I M 7
Now, I want to create a barplot using pandas and seaborn showing how many students:
- Have 3 ore more letters in the column "Subject"
- Have at least one 3 in the colum "Marks"
- Have both things
I tried with:
n_subject = dataset['Subject'].str.count('w+')
dataset['NumberSubjects']= n_subject
n_over = dataset[dataset.n_subject >= 3.0]
But it does not work and I'm stuck. I'm sure it is a very basic problem but I don't know what to do.
question from:https://stackoverflow.com/questions/65836010/how-to-plot-values-of-my-columns-being-above-a-certain-treshold