-
Notifications
You must be signed in to change notification settings - Fork 653
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
Passing MultiIndex to loc leads to keyError #1610
Comments
devin-petersohn
added
bug 🦗
Something isn't working
and removed
question ❓
Questions about Modin
labels
Jun 16, 2020
Hi @513090336, thanks for the report. I was able to reproduce what you're seeing, it is an issue with As a temporary workaround, you can use this code: result = result.set_index(['code_jq', 'time']).sort_index(ascending=False);
cut = result.groupby(['code_jq'])['factor'].apply(lambda x: len(x) >= total_days - 10)
indexer = cut.index.get_indexer_for(cut[cut].index)
result = result.iloc[indexer] |
devin-petersohn
changed the title
loc leads to keyError
Passing MultiIndex to loc leads to keyError
Jun 16, 2020
Thank you!you helps me a lot. |
Closed
6 tasks
devin-petersohn
added a commit
to devin-petersohn/modin
that referenced
this issue
Jul 23, 2020
Signed-off-by: Devin Petersohn <devin.petersohn@gmail.com>
aregm
pushed a commit
that referenced
this issue
Jul 24, 2020
Signed-off-by: Devin Petersohn <devin.petersohn@gmail.com>
aregm
pushed a commit
to aregm/modin
that referenced
this issue
Sep 16, 2020
…er (modin-project#1789) Signed-off-by: Devin Petersohn <devin.petersohn@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
DataFrame result has colums, ['code_jq', 'time', 'factor', 'close'].
When the program runs to this line of code,
result = result.loc[cut[cut].index]
,it shows keyerror that means dataframe can't find keys.Is anyone know why and how to solve it?
The text was updated successfully, but these errors were encountered: