I'm working with Pandas and SQLAlchemy to write yahoo finance prices into a SQL library. My question is, How do I remove the timestamp from the database?
Full Code
def update (symbol):
engine = create_engine("sqlite:///test.db") # Access the DB Engine
try:
if not engine.dialect.has_table(engine, symbol): # If table does not exist. Create
start = dt.date(2000, 1, 1)
end = dt.datetime.today()
get_prices = yahoo.DataReader(symbol, 'yahoo', start, end)
get_prices.to_sql(symbol, engine, if_exists='append')
This code works, it gets the prices into a SQL database. But the date portion comes up like this 2001-01-17 00:00:00.000000
.
How should I edit my code such that the timestamp doesn't show up??