Logo

DSC 10 Discussion 02 (10.13.20) - Shared screen with speaker view
Christine Deng
15:10
num_elems = len(some_array)
HARSHITHA GUMDALA
15:11
len(some_array)
CHANINDER RISHI
15:13
len
Arjun Malleswaran
15:14
len(some_array)
Raghav Pant
15:15
len(some_array_
Raghav Pant
15:16
)
Christine Deng
15:50
first_elem = some_array[0]
Raghav Pant
15:51
some_array[0]
Vedan Desai
16:13
some_array[-1]
Christine Deng
16:14
some_array[-1]
Raghav Pant
16:56
We take the item at the second last index.
Raghav Pant
18:09
I tried some_array[0:4], but it didn't work
Spencer Wueste
18:11
np.array(some_array[:5])
Raghav Pant
18:29
*0:5
Raghav Pant
20:48
some_array.max()
Jaeda Gantulga
20:49
.max()
Christine Deng
20:51
max(some_array)
Vedan Desai
20:58
max(some_array)
CHANINDER RISHI
21:00
Isn’t there like 2 methods
Raghav Pant
21:43
Three, one is python inbuilt, the other is an array method, and one is a numpy pethood.
Raghav Pant
21:43
*method
Vedan Desai
22:50
np.mean(some_array[:6])
Kyle Znachko
23:03
some_array[:6].mean()
CHANINDER RISHI
23:36
arange
Kyle Znachko
23:38
aranhge
Kyle Znachko
26:49
This question is super trivial…but what does the “nd” in np.ndarray signify?
Kyle Znachko
27:50
Thanks!
ALYSON YI
32:00
Candy.get(
Xuzhe Zhi
32:00
use sort
Kyle Znachko
32:01
candy.get(‘win percent’)
JARED DISHMAN
32:03
np.array(candy.get("winpercent").index[0:5])
CHANINDER RISHI
32:12
Get win percent column
CHANINDER RISHI
32:17
And sort by
JARED DISHMAN
32:27
ah crap I forgot to sort
Raghav Pant
34:51
Is the "np.array" prior required? Mine worked fine without it.
Teresa Lee
39:04
can we just find the length of the first column?
CHANINDER RISHI
39:31
Wait so the columns of caramel and chocolate just consisted of 0’s and 1’s right? To represent yes and no if they have them or not…
CHANINDER RISHI
39:56
Wrd ok thank you
Vedan Desai
40:42
The last one in Boolean indexing
Jaeda Gantulga
43:11
is most or all of the reference sheet going to be used for DSC 10?
Raghav Pant
43:36
Could we go up a little to 2.3, please? I didn't see the last line.
Raghav Pant
43:46
Ah, thank you.
Jaeda Gantulga
44:16
i see, thank you
Kyle Znachko
44:24
woke
Kishan Pansuria
55:30
will the completed discussion notebook be posted
Kishan Pansuria
56:01
yeah the one live rn
Michael Garcia-perez
56:02
Yes
Kaitlyn Chan
56:03
i like these
Vedan Desai
56:07
agreed
Medha Upadhyay
56:11
yes :)
Christine Deng
01:02:39
I'm confused because when I ran the code without .index[0] there are multiple candies with the same number?
Medha Upadhyay
01:02:56
^^ how do you decide which one is the answer
Christine Deng
01:03:49
^^ do you just default pick the top one with index[0]?
Christine Deng
01:04:55
thank you!
Teresa Lee
01:05:32
are the columns containing the binary numbers each arrays?
Teresa Lee
01:05:58
ok thx
Teresa Lee
01:19:45
when will there be a difference between loc and iloc?
Anjana Sriram
01:23:47
Thank you so much!!!
Christine Deng
01:23:49
Thank you! :)
Kaitlyn Chan
01:23:50
that was so helpful, thank you!
Terho Koivisto
01:23:54
Thanks!
Vedan Desai
01:23:55
Thanks!
Teresa Lee
01:23:56
thank you!!!
Varun Dinesh
01:23:56
Thank you