You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to propose adding a as_dict method to dbf.Record class. It can be helpful if we don't know in advance the field names for a DBF and don't want to check table.field_names and cleanup strings.
I can create a PR with docs but already tested the following code:
open your tables like this dbf.Table(..., default_data_types={'C':dbf.Char}) to automatically strip the strings refer https://stackoverflow.com/a/58701351 for more info
I'd like to propose adding a
as_dict
method todbf.Record
class. It can be helpful if we don't know in advance the field names for a DBF and don't want to checktable.field_names
and cleanup strings.I can create a PR with docs but already tested the following code:
strip_strings
is very useful for me (I use it in almost everytime I'm reading a DBF), since the string values always have trailing spaces.The text was updated successfully, but these errors were encountered: