# Need help simples task, i'm newbe

**URL:** <https://discourse.jupyter.org/t/need-help-simples-task-im-newbe/4551>\
**Category:** General\
**Tags:** how-to\
**Created:** [May 26, 2020, 4:40am UTC](https://discourse.jupyter.org/t/need-help-simples-task-im-newbe/4551 "2020-05-26T04:40:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Glauber\_Naue](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/glauber_naue/32/1207_2.png) [@Glauber\_Naue](https://discourse.jupyter.org/u/Glauber_Naue)\
**Post date:** [May 26, 2020, 4:40am UTC](https://discourse.jupyter.org/t/need-help-simples-task-im-newbe/4551/1 "2020-05-26T04:40:13Z")

</div>

Hi guys i started at jupyter notebook few days ago.

I need help, i have a dataframe py panda. something like dis

Date Stock Volume  
01/02 APPL 1.000.000  
01/02 YUSS 200.000  
01/02 DISN 1.500.000  
02/02 APPL 100.000  
02/02 YUSS 1.250.000  
02/02 DISN 2.000.000  
… … …

I need to select the stock that was traded in more than 80% of the days with volume greater than  
$ 500.000,00 per day.

I started like this:

def criterio (row):  
if row [‘volume’] \>= 500000:  
return 1  
else:  
return 0

but i dont know hou to link to stock to see if appeared “1” 80% of the cases to the individually stock; stock.

---

<div class="post-metadata">

**Author:** ![1kastner](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/1kastner/32/1537_2.png) [@1kastner](https://discourse.jupyter.org/u/1kastner)\
**Post date:** [May 26, 2020, 5:33pm UTC](https://discourse.jupyter.org/t/need-help-simples-task-im-newbe/4551/2 "2020-05-26T17:33:10Z")

</div>

Would you mind asking at another place like stackoverflow? This forum is not about programming that much.

---

<div class="post-metadata">

**Author:** ![Glauber\_Naue](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/glauber_naue/32/1207_2.png) [@Glauber\_Naue](https://discourse.jupyter.org/u/Glauber_Naue)\
**Post date:** [May 26, 2020, 5:48pm UTC](https://discourse.jupyter.org/t/need-help-simples-task-im-newbe/4551/3 "2020-05-26T17:48:44Z")

</div>

Oh okay (sorry), sure i will do that, thank you for the warning.
