Skip to content

Commit

Permalink
read space first, then tab
Browse files Browse the repository at this point in the history
  • Loading branch information
wayneweiqiang committed Sep 24, 2021
1 parent 2ffd689 commit eba5272
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions phasenet/data_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def __init__(self, format="numpy", config=DataConfig(), **kwargs):
if format in ["numpy", "mseed", "sac"]:
self.data_dir = kwargs["data_dir"]
try:
csv = pd.read_csv(kwargs["data_list"], header=0, sep=None, engine="python")
csv = pd.read_csv(kwargs["data_list"], header=0, sep='[,|\s+]', engine="python")
except:
csv = pd.read_csv(kwargs["data_list"], header=0, sep="\t")
self.data_list = csv['fname']
Expand Down Expand Up @@ -744,7 +744,7 @@ def __init__(self, stations, amplitude=True, remove_resp=True, config=DataConfig

super().__init__(format="mseed", config=config, **kwargs)
try:
self.stations = pd.read_csv(stations, sep=None, engine="python")
self.stations = pd.read_csv(stations, sep='[,|\s+]', engine="python")
except:
self.stations = pd.read_csv(stations, delimiter="\t")
print(self.stations)
Expand Down

0 comments on commit eba5272

Please sign in to comment.