Skip to content

Commit

Permalink
fix logic to build pandas DataFrame to properly get header informatio…
Browse files Browse the repository at this point in the history
…n from observation header IDs
  • Loading branch information
georgemccabe committed May 2, 2024
1 parent 2d974bf commit b71160f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scripts/python/met/point_nc.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,12 +285,12 @@ def write_nc_data(nc_dataset, point_obs):

def to_pandas(self):
return pd.DataFrame({
'typ': [self.hdr_typ_table[i] for i in self.hdr_typ],
'sid': [self.hdr_sid_table[i] for i in self.hdr_sid],
'vld': [self.hdr_vld_table[i] for i in self.hdr_vld],
'lat': self.hdr_lat,
'lon': self.hdr_lon,
'elv': self.hdr_elv,
'typ': [self.hdr_typ_table[self.hdr_typ[i]] for i in self.obs_hid],
'sid': [self.hdr_sid_table[self.hdr_sid[i]] for i in self.obs_hid],
'vld': [self.hdr_vld_table[self.hdr_vld[i]] for i in self.obs_hid],
'lat': [self.hdr_lat[i] for i in self.obs_hid],
'lon': [self.hdr_lon[i] for i in self.obs_hid],
'elv': [self.hdr_elv[i] for i in self.obs_hid],
'var': [self.obs_var_table[i] if self.use_var_id else f'{i}'
for i in self.obs_vid],
'lvl': self.obs_lvl,
Expand Down

0 comments on commit b71160f

Please sign in to comment.