Skip to content

Commit

Permalink
simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
ruihe774 committed Jul 21, 2024
1 parent 674721d commit dab0dec
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,8 @@ fn read_lines(path: impl AsRef<Path>) -> io::Result<DataFrame> {
mmap.len(),
)
};
let array = ChunkedArray::<StringType>::from(array);
let mut series = Series::from(array);
series.rename("lines");
let frame = DataFrame::new(vec![series]).unwrap();
let array = StringChunked::with_chunk("lines", array);
let frame = DataFrame::new(vec![array]).unwrap();
Ok(frame)
}

Expand Down

0 comments on commit dab0dec

Please sign in to comment.