Skip to content

Commit

Permalink
fix DataFrame.flattenIndices test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
trxcllnt committed Jun 2, 2023
1 parent 218074f commit f4806cb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions modules/cudf/src/data_frame.ts
Original file line number Diff line number Diff line change
Expand Up @@ -719,12 +719,11 @@ export class DataFrame<T extends TypeMap = any> {
const table = includeNulls ? df.asTable().explodeOuterPosition(i, mr) //
: df.asTable().explodePosition(i, mr);
return new DataFrame(df.names.reduce((series_map, name, index) => {
if (index <= i) {
series_map[name] =
(this.get(name) as any).elements.__construct(table.getColumnByIndex(index));
if (index === i) {
series_map[name] = Series.new(table.getColumnByIndex(index));
} else {
series_map[name] =
df.__constructChild(name, table.getColumnByIndex(index + 1));
df.__constructChild(name, table.getColumnByIndex(+(index >= i) + index));
}
return series_map;
}, {} as SeriesMap<U>));
Expand Down

0 comments on commit f4806cb

Please sign in to comment.