shivangibithel
commited on
Commit
•
0c8405f
1
Parent(s):
88bb320
Update SOTAB.py
Browse files
SOTAB.py
CHANGED
@@ -117,7 +117,7 @@ class WikiTableQuestions(datasets.GeneratorBasedBuilder):
|
|
117 |
# df_ = pd.DataFrame(data)
|
118 |
|
119 |
df_ = pd.read_json(os.path.join(root_dir, table_name), compression='gzip', lines=True)
|
120 |
-
df_ = df_.
|
121 |
|
122 |
col = []
|
123 |
for j in range(len(df_.loc[0])):
|
@@ -140,6 +140,7 @@ class WikiTableQuestions(datasets.GeneratorBasedBuilder):
|
|
140 |
def _generate_examples(self, main_filepath, root_dir):
|
141 |
|
142 |
df = pd.read_csv(main_filepath, encoding="utf8")
|
|
|
143 |
for ind in df.index:
|
144 |
# example_id = ind
|
145 |
table_name = df['table_name'][ind]
|
|
|
117 |
# df_ = pd.DataFrame(data)
|
118 |
|
119 |
df_ = pd.read_json(os.path.join(root_dir, table_name), compression='gzip', lines=True)
|
120 |
+
# df_ = df_.astype({'Fee':'string','Discount':'string'})
|
121 |
|
122 |
col = []
|
123 |
for j in range(len(df_.loc[0])):
|
|
|
140 |
def _generate_examples(self, main_filepath, root_dir):
|
141 |
|
142 |
df = pd.read_csv(main_filepath, encoding="utf8")
|
143 |
+
df = df.astype({'table_name':'string','column_index':'string', 'label':'string'})
|
144 |
for ind in df.index:
|
145 |
# example_id = ind
|
146 |
table_name = df['table_name'][ind]
|