Skip to content

Commit

Permalink
Merge 251c3ff into 33f7328
Browse files Browse the repository at this point in the history
  • Loading branch information
dnicolodi committed Jan 19, 2022
2 parents 33f7328 + 251c3ff commit ecc98b9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions petl/io/pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ def todataframe(table, index=None, exclude=None, columns=None,
"""
import pandas as pd
l = list(table)
data = l[1:]
it = iter(table)
header = next(it)
if columns is None:
columns = l[0]
return pd.DataFrame.from_records(data, index=index, exclude=exclude,
columns = header
return pd.DataFrame.from_records(it, index=index, exclude=exclude,
columns=columns, coerce_float=coerce_float,
nrows=nrows)

Expand Down

0 comments on commit ecc98b9

Please sign in to comment.