<jupyter_start><jupyter_text>code,代码name,名称industry,所属行业area,地区pe,市盈率outstanding,流通股本(亿)totals,总股本(亿)totalAssets,总资产(万)liquidAssets,流动资产fixedAssets,固定资产reserved,公积金reservedPerShare,每股公积金esp,每股收益bvps,每股净资pb,市净率timeToMarket,上市日期undp,未分利润perundp, 每股未分配rev,收入同比(%)profit,利润同比(%)gpr,毛利率(%)npr,净利润率(%)holders,股东人数['name', 'pe', 'outstanding', 'totals', 'totalAssets', 'liquidAssets', 'fixedAssets', 'esp', 'bvps', 'pb',  'perundp', 'rev', 'profit', 'gpr', 'npr', 'holders']<jupyter_code>col_show = ['name', 'open', 'pre_close', 'price', 'high', 'low', 'volume', 'amount',  'time', 'code']
initial_letter = ['HTGD','OFKJ','CDKJ','ZJXC','GXKJ','FHTX','DZJG']
code =[]
for letter in initial_letter:
    code.append(df[df['UP']==letter].code[0])
    #print(code)
if code != '': #not empty != ''
    df_price = ts.get_realtime_quotes(code)
    #print(df_price)
    #df_price.columns.values.tolist()
df_price[col_show]<jupyter_output><empty_output><jupyter_text>TO-DOAdd the map from initial to codebuild up a dataframe with fundamental and indicotorsFor Leadings, need cache more data for the begining data<jupyter_code>from matplotlib.mlab import csv2rec
df=ts.get_k_data("002456",start='2018-01-05',end='2018-01-09')
df.to_csv("temp.csv")
r=csv2rec("temp.csv")
#r.date
import time, datetime

#str = df[df.code == '600487'][clommun_show].name.values
#print(str)
today=datetime.date.today()
yesterday = today - datetime.timedelta(1)
#print(today, yesterday)
i = datetime.datetime.now()
print ("当前的日期和时间是 %s" % i)
print ("ISO格式的日期和时间是 %s" % i.isoformat() )
print ("当前的年份是 %s" %i.year)
print ("当前的月份是 %s" %i.month)
print ("当前的日期是  %s" %i.day)
print ("dd/mm/yyyy 格式是  %s/%s/%s" % (i.day, i.month, i.year) )
print ("当前小时是 %s" %i.hour)
print ("当前分钟是 %s" %i.minute)
print ("当前秒是  %s" %i.second)
import time
 
localtime = time.localtime(time.time())
print("本地时间为 :", localtime)

# 格式化成2016-03-20 11:45:39形式
print(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()))
 
# 格式化成Sat Mar 28 22:24:24 2016形式
print(time.strftime("%a %b %d %H:%M:%S %Y", time.localtime()))
#!/usr/bin/python
# -*- coding: UTF-8 -*-
 
import calendar 
cal = calendar.month(2019, 3)
#print (cal)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.2018348623853211, 'fraction_numerical': 0.029357798165137616, 'mean_word_length': 6.817204301075269, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '535868', 'license': 'Apache-2.0', 'n_tokens_mistral': 1056, 'n_tokens_neox': 1029, 'n_words': 160, 'path': 'sample_code/date_utils.ipynb', 'repo_name': 'yunfeiz/py_learnt', 'size': '2180'}