init
This commit is contained in:
commit
b7a655447a
6 changed files with 216 additions and 0 deletions
0
labsw/__init__.py
Normal file
0
labsw/__init__.py
Normal file
26
labsw/io.py
Normal file
26
labsw/io.py
Normal file
|
@ -0,0 +1,26 @@
|
|||
import pandas as pd
|
||||
import numpy as np
|
||||
|
||||
def load_data_RH_logger(filepath):
|
||||
"""
|
||||
|
||||
"""
|
||||
with open(filepath, 'r') as f:
|
||||
header = f.readline()
|
||||
header = header.strip('# ').rstrip('\n').split('|')
|
||||
header.append('X') # Empty col...
|
||||
|
||||
df = pd.read_csv('_data.dat', sep=' ', names=header, skiprows=1)
|
||||
df = df.drop(columns='X')
|
||||
df = df.drop(np.arange(1))
|
||||
|
||||
df['dm_m'] = (df['weight'] - df['weight'].iloc[0]) / df['weight'].iloc[0]
|
||||
|
||||
|
||||
# Crop data
|
||||
#df = df.drop(df[df['time'] < 0.02 * 3600].index)
|
||||
df = df.reset_index()
|
||||
del df['index']
|
||||
#df.head()
|
||||
#df = df[df['time'] > 301_000]
|
||||
return df
|
Loading…
Add table
Add a link
Reference in a new issue