@@ -67,7 +67,7 @@ def __init__(self, input_path, msg_types=None,
67
67
if msg_types is None :
68
68
# Use default message types
69
69
msg_types = ['GGA' , 'RMC' ]
70
- pd_df = pd . DataFrame ()
70
+ temporary_dictionary_list_df = []
71
71
field_dict = {}
72
72
prev_timestamp = None
73
73
@@ -101,8 +101,7 @@ def __init__(self, input_path, msg_types=None,
101
101
delta_t = datetime .datetime .combine (datestamp (date ), timestamp (time ))
102
102
field_dict ['gps_millis' ] = datetime_to_gps_millis (delta_t )
103
103
104
- new_row = pd .DataFrame ([field_dict ])
105
- pd_df = pd .concat ([pd_df , new_row ])
104
+ temporary_dictionary_list_df .append (field_dict )
106
105
field_dict = {}
107
106
prev_timestamp = msg .timestamp
108
107
if "sentence_type" in msg .__dir__ () and msg .sentence_type in msg_types :
@@ -134,8 +133,8 @@ def __init__(self, input_path, msg_types=None,
134
133
date = field_dict .pop ('datestamp' )
135
134
delta_t = datetime .datetime .combine (datestamp (date ), timestamp (time ))
136
135
field_dict ['gps_millis' ] = datetime_to_gps_millis (delta_t )
137
- new_row = pd . DataFrame ([ field_dict ] )
138
- pd_df = pd .concat ([ pd_df , new_row ] )
136
+ temporary_dictionary_list_df . append ( field_dict )
137
+ pd_df = pd .DataFrame . from_dict ( temporary_dictionary_list_df )
139
138
# As per `gnss_lib_py` standards, convert the heading from degrees
140
139
# to radians
141
140
pd_df ['true_course_rad' ] = (np .pi / 180. )* pd_df ['true_course' ]\
0 commit comments