|
|
@@ -3,17 +3,17 @@ from dao import Mysql
|
|
|
def load_order_data_from_mysql(city_uuid):
|
|
|
"""从数据库中读取订单数据"""
|
|
|
client = Mysql()
|
|
|
- tablename = "yunfu_mock_data"
|
|
|
- # tablename = "tads_brandcul_cust_order"
|
|
|
+ # tablename = "yunfu_mock_data"
|
|
|
+ tablename = "tads_brandcul_cust_order"
|
|
|
query_text = "*"
|
|
|
# city_uuid = "00000000000000000000000011441801"
|
|
|
- # df = client.load_data(tablename, query_text, "city_uuid", city_uuid)
|
|
|
- df = client.load_mock_data(tablename, query_text)
|
|
|
+ df = client.load_data(tablename, query_text, "city_uuid", city_uuid)
|
|
|
+ # df = client.load_mock_data(tablename, query_text)
|
|
|
if len(df) == 0:
|
|
|
return None
|
|
|
|
|
|
- # df.drop('stat_month', axis=1, inplace=True)
|
|
|
- # df.drop('city_uuid', axis=1, inplace=True)
|
|
|
+ df.drop('stat_month', axis=1, inplace=True)
|
|
|
+ df.drop('city_uuid', axis=1, inplace=True)
|
|
|
|
|
|
# 去除重复值和填补缺失值
|
|
|
df.drop_duplicates(inplace=True)
|