Skip to content

Commit 71f2a2a

Browse files
committed
Add built-in export function to pandas dataframe
Add built-in export function to pandas dataframe
1 parent 53a5018 commit 71f2a2a

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

dbfread/dbf.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,11 @@ def _iter_records(self, record_type=b' '):
341341
else:
342342
skip_record(infile)
343343

344+
def DataFrame(self):
345+
import pandas as pd
346+
df = pd.DataFrame()
347+
return df.from_records(self.records)
348+
344349
def __iter__(self):
345350
if self.loaded:
346351
return list.__iter__(self._records)

0 commit comments

Comments
 (0)