Skip to content

Commit fde2ad6

Browse files
authored
Merge pull request #113 from rluedde/2014_replicate_fix
2014 replicate fix
2 parents c34d80d + fde164b commit fde2ad6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cenpy/moe/replicate_table_utils.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ def read_replicate_file(fname):
7171

7272
table = pd.read_csv(
7373
fname,
74-
skiprows=[1, 2],
7574
dtype={
7675
"TBLID": str,
7776
"GEOID": str,
@@ -83,6 +82,9 @@ def read_replicate_file(fname):
8382
encoding="latin-1",
8483
)
8584

85+
# Keep only rows that have a GEOID (remove meta-data rows)
86+
table = table[table["GEOID"].notna()]
87+
8688
table.loc[table.ORDER.str.len() == 1, "ORDER"] = (
8789
"00" + table.loc[table.ORDER.str.len() == 1, "ORDER"]
8890
)

0 commit comments

Comments
 (0)