Skip to content

Commit

Permalink
Idiomatic polars 'peek_dict' method (#453)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-beedie authored Apr 2, 2023
1 parent cb6733e commit 02151cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fugue_polars/polars_dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def peek_array(self) -> List[Any]:

def peek_dict(self) -> Dict[str, Any]:
self.assert_not_empty()
return dict(zip(self._native.columns, self._native.row(0)))
return self._native.row(0, named=True)

def count(self) -> int:
return self.native.shape[0]
Expand Down

0 comments on commit 02151cd

Please sign in to comment.