Fix bugs giving errors with plot_gc()
This commit is contained in:
parent
b586f46979
commit
95e411ac21
2 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ def prettify_gc_plot(fig, ax, options=None):
|
|||
'positions': {'xaxis': 'bottom', 'yaxis': 'left'},
|
||||
'x_vals': 'specific_capacity', 'y_vals': 'voltage',
|
||||
'xlabel': None, 'ylabel': None,
|
||||
'units': None,
|
||||
'units': {'capacity': 'mAh', 'specific_capacity': r'mAh g$^{-1}$', 'time': 's', 'current': 'mA', 'energy': 'mWh', 'mass': 'g', 'voltage': 'V'},
|
||||
'sizes': None,
|
||||
'title': None
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue