Skip to content

Commit

Permalink
post3
Browse files Browse the repository at this point in the history
  • Loading branch information
Weixuan committed Sep 10, 2020
1 parent ebec5cc commit 8eec4f9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pmlb/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"""

__version__ = '1.0.1.post2'
__version__ = '1.0.1.post3'
11 changes: 4 additions & 7 deletions pmlb/dataset_lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,10 @@
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"""
import pathlib, pandas

try: # used in repo
df_summary = pandas.read_csv('pmlb/all_summary_stats.tsv', sep='\t')
except: # used in pypi pkg
import pkgutil
data = pkgutil.get_data('pmlb', 'all_summary_stats.tsv')
df_summary = pandas.read_csv(data , sep='\t')
from io import StringIO
import pkgutil
data = pkgutil.get_data('pmlb', 'all_summary_stats.tsv')
df_summary = pandas.read_csv(StringIO(data.decode("utf-8")) , sep='\t')
regression_dataset_names = df_summary.query('task=="regression"')['dataset'].tolist()
classification_dataset_names = df_summary.query('task=="classification"')['dataset'].tolist()
dataset_names = regression_dataset_names + classification_dataset_names
Expand Down

0 comments on commit 8eec4f9

Please sign in to comment.