Fix bugs giving errors with plot_gc()

This commit is contained in:
rasmusvt 2022-04-22 13:03:31 +02:00
parent b586f46979
commit 95e411ac21
2 changed files with 3 additions and 3 deletions

View file

@ -76,13 +76,13 @@ def read_biologic(path):
Output:
df: pandas DataFrame containing the data as-is, but without additional NaN-columns.'''
with open(path, 'r') as f:
with open(path, 'rb') as f:
lines = f.readlines()
header_lines = int(lines[1].split()[-1]) - 1
df = pd.read_csv(path, sep='\t', skiprows=header_lines)
df = pd.read_csv(path, sep='\t', skiprows=header_lines, encoding='cp1252')
df.dropna(inplace=True, axis=1)
return df