Skip to content

Commit

Permalink
fixed bug for loading samples
Browse files Browse the repository at this point in the history
  • Loading branch information
Chilipp committed Apr 16, 2019
1 parent d1554ae commit 16e83a5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions straditize/widgets/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -1437,15 +1437,15 @@ def load_samples(self, fname=None):
base, ext = osp.splitext(fname)
if ext in ['.nc', '.nc4']:
with xr.open_dataset(fname) as ds:
df = self.straditizer.from_dataset(ds).final_df
df = self.straditizer.from_dataset(ds, plot=False).final_df
elif ext == '.pkl':
with open(fname, 'rb') as f:
df = pickle.load(f).final_df
elif ext in ['.xls', '.xlsx']:
df = pd.read_excel(fname)
df = pd.read_excel(fname, index_col=0)
else:
df = pd.read_csv(fname)
samples = df.iloc[:, 0].values
df = pd.read_csv(fname, index_col=0)
samples = df.index.values
try:
samples = self.straditizer.data2px_y(samples)
except ValueError:
Expand Down

0 comments on commit 16e83a5

Please sign in to comment.