Skip to content

Tag: indexing

With python; Getting index of wrong item of list [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 9 months ago. Improve this question I’m trying to get the indeces of the items of my list but on one item it returns a wr…

Issue w/ pandas.index.get_loc() when match is found, TypeError: (“‘>’ not supported between instances of ‘NoneType’ and ‘str'”, ‘occurred at index 1’)

Below is the example to reproduce the error: The desired output should be a list or array with the values [3,NaN,4,3]. The NaN because it does not satisfy the criteria. I checked the pandas references and it says that for cases when you do not have an exact match you can change the “method” to &#8…

Numba: indexing a vector is giving an error

I started using python and numba recently. My problem is: I have a matrix (n rows and m columns).In a for loop I have to change the values ​​of specific columns. Without numba, the code is running fine. But when I use njit(), it just crashes. Note: In my real project, each row don’t have the same values…