J
J
Jungles2020-06-23 16:34:40
Python
Jungles, 2020-06-23 16:34:40

How to work with pandas module?

I'm just getting acquainted, so the questions are stupid.
1) why .loc or .iloc and not .loc([]) or .iloc([]) ?
2) I accidentally wrote .loc[index], and got only the value (variable), without the index (I just find it similar to a dictionary)
so, is it just like that or in different tasks you sometimes need an index-value, and sometimes only a value?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
Finnick is healthy, 2020-06-23
@phinnik

because loc is not a function, but an object of the DataFrame class.
loc - presumably an array
iloc - an iterator

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question