Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

indexing error in DataFrame instantiation #3467

Closed
ajpotts opened this issue Jul 12, 2024 · 1 comment · Fixed by #3429
Closed

indexing error in DataFrame instantiation #3467

ajpotts opened this issue Jul 12, 2024 · 1 comment · Fixed by #3429
Assignees
Labels
bug Something isn't working

Comments

@ajpotts
Copy link
Contributor

ajpotts commented Jul 12, 2024

To Reproduce

from arkouda import *

def perturb(a: ak.pdarray, atol: float, rtol: float, rng=None):
   if rng is None:
       rng = ak.random.default_rng()
   return a + rtol * a + atol * rng.random()

size = 100

rng = ak.random.default_rng()
atol = 0.001
rtol = 0.001
a = ak.arange(size, dtype="float64")
a2 = perturb(a, atol=atol, rtol=rtol, rng=rng)
idx2 = Index(a2)
df = DataFrame({"col1": a2}, index=idx2)
pd_df = df.to_pandas(retain_index=True)
ak_df = ak.DataFrame(pd_df)

Retuns a KeyError: 0.

@ajpotts ajpotts added the bug Something isn't working label Jul 12, 2024
@ajpotts ajpotts self-assigned this Jul 12, 2024
@ajpotts
Copy link
Contributor Author

ajpotts commented Jul 12, 2024

There error is from line 901 in dataframe.py.

ajpotts added a commit to ajpotts/arkouda that referenced this issue Jul 22, 2024
ajpotts added a commit to ajpotts/arkouda that referenced this issue Jul 22, 2024
github-merge-queue bot pushed a commit that referenced this issue Jul 22, 2024
Co-authored-by: Amanda Potts <ajpotts@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant