suchkow's picture
Upload 48 files
25e7dcb verified
raw
history blame contribute delete
484 Bytes
import pandas as pd
def convert_column_names(value):
value = value.lower()
value = value.replace(" ", "_")
return value
def check_object(obj):
if obj is None:
raise ValueError('Return of yfinance download is None')
elif isinstance(obj, pd.DataFrame):
if obj.empty:
raise ValueError('DataFrame is empty')
else:
raise ValueError(f'Return of yfinance download is neither a Dataframe nor None {type(obj)}')