Spaces:
Runtime error
Runtime error
huggingface112
commited on
Commit
•
3e323f0
1
Parent(s):
48b892d
implement get_oldest_stocks_price
Browse files- db_operation.py +5 -1
db_operation.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
|
2 |
Abstraction for saving data to db
|
3 |
'''
|
4 |
import pandas as pd
|
@@ -56,6 +56,10 @@ def _get_oldest(table_name, ts_column='date'):
|
|
56 |
df[ts_column] = pd.to_datetime(df[ts_column])
|
57 |
return df
|
58 |
|
|
|
|
|
|
|
|
|
59 |
def get_oldest_portfolio_profile():
|
60 |
df = _get_oldest(ts.PORTFOLIO_TABLE)
|
61 |
return df
|
|
|
1 |
+
'''
|
2 |
Abstraction for saving data to db
|
3 |
'''
|
4 |
import pandas as pd
|
|
|
56 |
df[ts_column] = pd.to_datetime(df[ts_column])
|
57 |
return df
|
58 |
|
59 |
+
def get_oldest_stocks_price():
|
60 |
+
df = _get_oldest(ts.STOCKS_PRICE_TABLE, ts_column='time')
|
61 |
+
return df
|
62 |
+
|
63 |
def get_oldest_portfolio_profile():
|
64 |
df = _get_oldest(ts.PORTFOLIO_TABLE)
|
65 |
return df
|