mathguy

2

votes
3

answer
18

views

Last occurrence of a Groupby object under certain conditions

Let's say I have a DataFrame that looks like this: Categories Values 0 Category 0 1 1 Category 0 0 2 Category 0 -1 3 Category 0 0 4 Category 1 1 5 Category 1 0 6 Category 1 -1 7 Category 1 0 8 Category 2 1 9 Category 2 0...
mathguy
1

votes
2

answer
30

views

Rearrange rows of Dataframe alternatively

I have a dataframe looks like this: df = pd.DataFrame({'col1': [i+1 for i in range(10)] + [-i-1 for i in range(10)], 'col2': ['random string'] *20}) print(df) col1 col2 0 1 random string 1 2 random string 2 3 random string 3 4 random string 4 5 random string 5...
mathguy
1

votes
1

answer
112

views

Numba @jit fails to speed up the performance of this function. Anyway to fix that?

I am quite new to the numba package in python. I am not sure if I am using the numba.jit correctly, but the code just runs too slow with 23.7s per loops over the line: Z1 = mmd(X,Y,20) What is the correct way to optimize the code? I need your help guys. Thank you. Here is my code: import pandas as p...
mathguy
2

votes
0

answer
31

views

Pros and Cons of supplying pdb file to customer

My company publishes a proprietary software component. We have a customer that is having an issue (may be with our product or their application, they don't know) and they've asked us to supply the .pdb file so they can debug. We're hesitant because we want to protect our intellectual property to t...
mathguy