mstz commited on
Commit
0b7a720
1 Parent(s): 592b7d7

Upload ipums.py

Browse files
Files changed (1) hide show
  1. ipums.py +1 -2
ipums.py CHANGED
@@ -109,8 +109,6 @@ class Ipums(datasets.GeneratorBasedBuilder):
109
  ]
110
 
111
  def _generate_examples(self, filepath: str):
112
- print("\n\n\nfilepath")
113
- print(filepath)
114
  data = pandas.read_csv(filepath)
115
  data = self.preprocess(data)
116
 
@@ -125,6 +123,7 @@ class Ipums(datasets.GeneratorBasedBuilder):
125
  data.loc[:, feature] = data[feature].apply(encoding_function)
126
 
127
  data.drop("instance_weight", axis="columns", inplace=True)
 
128
 
129
  return data[list(features_types_per_config[self.config.name].keys())]
130
 
 
109
  ]
110
 
111
  def _generate_examples(self, filepath: str):
 
 
112
  data = pandas.read_csv(filepath)
113
  data = self.preprocess(data)
114
 
 
123
  data.loc[:, feature] = data[feature].apply(encoding_function)
124
 
125
  data.drop("instance_weight", axis="columns", inplace=True)
126
+ data = data.rename(columns={"instance migration_code_change_in_msa": "migration_code_change_in_msa"})
127
 
128
  return data[list(features_types_per_config[self.config.name].keys())]
129