Skip to content

Commit

Permalink
Add built-in export function to pandas dataframe
Browse files Browse the repository at this point in the history
Add built-in export function to pandas dataframe
  • Loading branch information
Zoynels committed Nov 22, 2019
1 parent 53a5018 commit 71f2a2a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dbfread/dbf.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,11 @@ def _iter_records(self, record_type=b' '):
else:
skip_record(infile)

def DataFrame(self):
import pandas as pd
df = pd.DataFrame()
return df.from_records(self.records)

def __iter__(self):
if self.loaded:
return list.__iter__(self._records)
Expand Down

0 comments on commit 71f2a2a

Please sign in to comment.