add load metadata
This commit is contained in:
		
							parent
							
								
									a35cf796ab
								
							
						
					
					
						commit
						5d9a8a4498
					
				
					 3 changed files with 13 additions and 1 deletions
				
			
		| 
						 | 
					@ -1 +1 @@
 | 
				
			||||||
__version__ = '0.1.4'
 | 
					__version__ = '0.1.5'
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										11
									
								
								labsw/io.py
									
										
									
									
									
								
							
							
						
						
									
										11
									
								
								labsw/io.py
									
										
									
									
									
								
							| 
						 | 
					@ -1,5 +1,7 @@
 | 
				
			||||||
import pandas as pd
 | 
					import pandas as pd
 | 
				
			||||||
import numpy as np
 | 
					import numpy as np
 | 
				
			||||||
 | 
					import yaml
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def load_data_RH_logger(filepath, every=1):
 | 
					def load_data_RH_logger(filepath, every=1):
 | 
				
			||||||
    """
 | 
					    """
 | 
				
			||||||
| 
						 | 
					@ -21,3 +23,12 @@ def load_data_RH_logger(filepath, every=1):
 | 
				
			||||||
    df = df.reset_index()
 | 
					    df = df.reset_index()
 | 
				
			||||||
    del df['index']
 | 
					    del df['index']
 | 
				
			||||||
    return df.iloc[::every]
 | 
					    return df.iloc[::every]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def load_metadata(filepath):
 | 
				
			||||||
 | 
						"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						"""
 | 
				
			||||||
 | 
						with open(tilepath, 'r') as stream:
 | 
				
			||||||
 | 
					    	metadata = yaml.safe_load(stream)
 | 
				
			||||||
 | 
						return metadata
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,2 +1,3 @@
 | 
				
			||||||
numpy
 | 
					numpy
 | 
				
			||||||
pandas
 | 
					pandas
 | 
				
			||||||
 | 
					pyyaml
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue