原创 SQL模糊匹配後再分組

####按硬件廠家統計覆蓋質量 create table Manufacture_STAT (select  (case      when Dev

原创 python解壓TAR文件至指定文件夾的實例

今天小編就爲大家分享一篇python解壓TAR文件至指定文件夾的實例,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧 如下所示: ######### Extract all files fro

原创 python解壓TAR文件至至指定文件夾

######### Extract all files from src_dir to des_dir def extract_tar_files(src_dir,des_dir): files = os.listdir(src

原创 MySQL Workbench出現:Error Code: 2013. Lost connection to MySQL server during query的問題解決

問題描述;   1.表規模是 150萬行,每行18列。 執行查詢語句:   selectcount(DeviceId) from(select DeviceId, count(distinct SubdeviceMac) as MACnu

原创 Python List清空操作

待補充

原创 Python異常處理實例

######### File is too big, read file line by line(if file is small, we can use pandas) def get_valid_inventory(src_dir

原创 pandas set_value用法

原始代碼:df_valid_inventory_sel_tmp['col1']=-9999 for index in df_valid_inventory_sel_tmp.index: time_stamp = time.time

原创 python時戳轉換成字符串日期,並形成時間序列文件

######### Get all performance data of one object def get_one_object_perfor_data(object_id,dst_dir,src_file_name):

原创 SQL 先分組再分段統計每段個數

####按家庭維度統計信號強度 create table Power_STAT (select  DeviceId, count(DeviceId) as AllNum, sum(case when Su

原创 巧用groupby解決Dataframe篩選分組效率慢問題

原代碼:for name in list_valid_perfor_inventory: time_stamp = time.time() df_tmp1 = df_all_performance[df_all_perfo

原创 遍歷文件夾下壓縮文件並解壓至指定文件夾

# -*- coding:utf-8 -*- import Cons as cs import os import zipfile ######### Extract all files in Dir def extract_to(s