" />

欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

使用Python代碼識(shí)別股票價(jià)格圖表模式實(shí)現(xiàn)

 更新時(shí)間:2023年12月06日 10:22:29   作者:deephub  
這篇文章主要為大家介紹了使用Python代碼識(shí)別股票價(jià)格圖表模式的實(shí)現(xiàn)示例詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪

正文

在股票市場(chǎng)交易的動(dòng)態(tài)環(huán)境中,技術(shù)和金融的融合催生了分析市場(chǎng)趨勢(shì)和預(yù)測(cè)未來(lái)價(jià)格走勢(shì)的先進(jìn)方法,本文將使用Python進(jìn)行股票模式識(shí)別

from collections import defaultdict
 
 import numpy as np
 import pandas as pd
 import matplotlib.pyplot as plt
 from scipy.signal import argrelextrema
 from statsmodels.nonparametric.kernel_regression import KernelReg
 from yahoofinancials import YahooFinancials

python庫(kù)介紹

上面的庫(kù)中,有幾個(gè)要點(diǎn)需要介紹:

collections.defaultdict當(dāng)缺少鍵時(shí),返回默認(rèn)值。使用它可以有效地存儲(chǔ)和組織數(shù)據(jù),比如鍵反映日期或資產(chǎn)符號(hào)等可識(shí)別的度量,值表示相應(yīng)的變量。

argrelextrema函數(shù)是SciPy庫(kù)中的一個(gè)函數(shù),用于進(jìn)行科學(xué)計(jì)算和技術(shù)計(jì)算。它有助于識(shí)別價(jià)格數(shù)據(jù)中的局部最大值和最小值,指示價(jià)格數(shù)據(jù)中的潛在轉(zhuǎn)折點(diǎn)或支撐位和阻力位。

statsmodels.nonparametric.kernel_regression.KernelReg:這個(gè)來(lái)自statmodels的子模塊提供了非參數(shù)核回歸功能。交易可以使用這種方法來(lái)擬合價(jià)格數(shù)據(jù)的平滑曲線,以確定趨勢(shì),無(wú)需假設(shè)曲線具有特定的參數(shù)形式。

YahooFinancials:該模塊從雅虎財(cái)經(jīng)獲取財(cái)務(wù)數(shù)據(jù)。我們可以訪問(wèn)大量的財(cái)務(wù)數(shù)據(jù),包括股票價(jià)格,財(cái)務(wù)報(bào)表和其他市場(chǎng)數(shù)據(jù),用于分析和決定如何處理投資組合。

start_date = '2017-01-01'
 end_date = '2017-12-31'
 stock_code = 'FB' # e.g. AMZN, GOOG, FB, NVDA

我們獲取的股票數(shù)據(jù)是在2017-01-01至2017-12-31期間。作為stock_code變量,F(xiàn)acebook, Inc.被設(shè)置為FB,即股票的代碼。

在指定的日期范圍內(nèi),交易算法將執(zhí)行該股票代碼的數(shù)據(jù)分析、交易信號(hào)或?qū)嶋H交易等操作。此代碼的目的是為交易算法建立基本參數(shù):目標(biāo)時(shí)間框架和交易的特定股票。

變量最終將在代碼中用于獲取歷史數(shù)據(jù)、執(zhí)行財(cái)務(wù)分析和回溯測(cè)試交易策略。對(duì)于任何專注于股票市場(chǎng)的交易系統(tǒng),這些參數(shù)是評(píng)估歷史表現(xiàn)和執(zhí)行實(shí)時(shí)交易的關(guān)鍵輸入。

def preprocess_data(start_date, end_date, stock_code):
     stock_data = YahooFinancials(stock_code).get_historical_price_data(start_date, end_date, 'daily')
     price_data = stock_data[stock_code]['prices']
     columns = ['formatted_date', 'open', 'high', 'low', 'close', 'adjclose', 'volume']
     new_columns = ['Date', 'Open', 'High', 'Low', 'Close', 'Adj Close', 'Volume']
     df = pd.DataFrame(data=price_data)[columns] # order dataframe columns
     df = df.rename(index=str, columns=dict(zip(columns, new_columns))) # rename dataframe columns
     return df, df['Close'], df['Date']

preprocess_data參數(shù)

preprocess_data有三個(gè)參數(shù):start_date、end_date和stock_code,它們指定時(shí)間范圍和股票類型。此函數(shù)的主要目標(biāo)是從Financials檢索給定股票的指定日期范圍內(nèi)的歷史股票價(jià)格。

獲取包括全面的金融信息,包括每日股票價(jià)格、開(kāi)盤價(jià)、最高價(jià)和最低價(jià),以及調(diào)整后的收盤價(jià)。獲得數(shù)據(jù)后,將其組織到pandas DataFrame中,

通過(guò)重命名列,可以實(shí)現(xiàn)更好的可讀性和與通用財(cái)務(wù)數(shù)據(jù)標(biāo)準(zhǔn)的一致性。該函數(shù)返回處理后的DataFrame以及兩個(gè)Series一維數(shù)組,其中包括收盤價(jià)和收盤價(jià)發(fā)生的日期。

df, prices, dates = preprocess_data(start_date, end_date, stock_code)
 prices.index = np.linspace(1, len(prices), len(prices))
 dates.index = np.linspace(1, len(dates), len(dates))

我們?yōu)閮山M數(shù)據(jù)(價(jià)格和日期)設(shè)置索引。然后就是對(duì)價(jià)格的分析和局部最大值和最小值的識(shí)別,這對(duì)交易者來(lái)說(shuō)是非常寶貴的。代碼采用了一個(gè)核心回歸模型,消除價(jià)格的周期性波動(dòng),從而更容易發(fā)現(xiàn)重要的趨勢(shì)。

# https://onlinelibrary.wiley.com/doi/full/10.1111/0022-1082.00265
 # reference: https://www.quantopian.com/posts/an-empirical-algorithmic-evaluation-of-technical-analysis
 def find_max_min(prices):
     model = KernelReg(prices.values, prices.index.values, var_type='c', bw='cv_ls')
     smooth_prices = pd.Series(data=model.fit([prices.index.values])[0], index=prices.index) # index also from 1
     # use the minima and maxima from the smoothed timeseries
     # to identify true local minima and maxima in the original timeseres
     # by taking the maximum/minimum price within a t-1, t+1 window in the smoothed timeseries
     smooth_prices_max_indices = argrelextrema(smooth_prices.values, np.greater)[0]
     smooth_prices_min_indices = argrelextrema(smooth_prices.values, np.less)[0]
     price_max_indices = []
     for i in smooth_prices_max_indices:
         if 1 < i < len(prices)-1:
             price_max_indices.append(prices.iloc[i-2:i+2].idxmax())
     price_min_indices = []
     for i in smooth_prices_min_indices:
         if 1 < i < len(prices)-1:
             price_min_indices.append(prices.iloc[i-2:i+2].idxmin())
     price_max = prices.loc[price_max_indices]
     price_min = prices.loc[price_min_indices]
     max_min = pd.concat([price_max, price_min]).sort_index()
     max_min = max_min[~max_min.duplicated()] # deduplicate points that are both maximum and minimum
     max_min
     return smooth_prices, smooth_prices_max_indices, smooth_prices_min_indices, \
             price_max_indices, price_min_indices, max_min

算法識(shí)別基于平滑價(jià)格數(shù)據(jù)的價(jià)格曲線改變方向的點(diǎn)

用一種算法來(lái)識(shí)別基于平滑價(jià)格數(shù)據(jù)的價(jià)格曲線改變方向的點(diǎn),代碼在這個(gè)平滑的時(shí)間序列中搜索相對(duì)最大值和最小值。代碼試圖在平滑數(shù)據(jù)中找到這些極值后,將這些極值映射回原始的非平滑價(jià)格數(shù)據(jù)。

它通過(guò)檢查平滑數(shù)據(jù)中每個(gè)極值點(diǎn)周圍的小窗口來(lái)實(shí)現(xiàn)這一點(diǎn),并確定該窗口內(nèi)的價(jià)格最高或最低-這些是真正的局部最大值和最小值。在平滑和窗口化處理完成之后,代碼將這些點(diǎn)組織到一個(gè)內(nèi)聚輸出中,刪除可能同時(shí)存在于最大值和最小值的任何重復(fù)點(diǎn)。

可以使用這個(gè)結(jié)果來(lái)確定交易的進(jìn)入和退出點(diǎn)。除了在代碼中使用外,該代碼還可以用于更大的策略中,根據(jù)這些發(fā)現(xiàn)觸發(fā)買入或賣出信號(hào)。

smooth_prices, smooth_prices_max_indices, smooth_prices_min_indices, \
             price_max_indices, price_min_indices, max_min = find_max_min(prices

smooth_prices包

smooth_prices包含平滑版本的價(jià)格數(shù)據(jù),可以消除噪音,使趨勢(shì)更容易識(shí)別。

有各種各樣的技術(shù)可用于平滑,包括移動(dòng)平均線和其他算法。變量smooth_prices_max_indices和smooth_prices_min_indices可能表示平滑價(jià)格指數(shù)在局部最大值和最小值列表中的位置。當(dāng)價(jià)格達(dá)到這些水平時(shí),在價(jià)格反轉(zhuǎn)之前識(shí)別潛在的買入或賣出信號(hào)是至關(guān)重要的。與前面的變量一樣,price_max_indices和price_min_indices是從原始的、未平滑的價(jià)格中計(jì)算出來(lái)的。

max_min可能是一個(gè)數(shù)組或列表,其中包含有關(guān)已識(shí)別的最大值和最小值的信息,可能結(jié)合平滑和非平滑數(shù)據(jù),用于根據(jù)本地價(jià)格極值確定是否進(jìn)入或退出頭寸??梢苑治鼋鹑趦r(jià)格數(shù)據(jù),識(shí)別峰值和低谷,并準(zhǔn)備數(shù)據(jù)用于算法交易。作為更大的技術(shù)分析系統(tǒng)的一部分,它可以用于基于歷史價(jià)格模式的自動(dòng)交易活動(dòng)。

下面我們看看上面代碼計(jì)算得到的結(jié)果:

fig, ax = plt.subplots(figsize=(20,10), dpi=200)
 ax.plot(dates, prices, label='Prices')
 ax.plot(dates, smooth_prices, label='Smoothed Prices', linestyle='dashed')
 ax.set_xticks(np.arange(0, len(dates), 30))
 smooth_prices_max = smooth_prices.loc[smooth_prices_max_indices]
 smooth_prices_min = smooth_prices.loc[smooth_prices_min_indices]
 price_max = prices.loc[price_max_indices]
 price_min = prices.loc[price_min_indices]
 ax.scatter(dates.loc[smooth_prices_max.index], smooth_prices_max.values, s=20, color='red', label='Smoothed Prices Maxima')
 ax.scatter(dates.loc[smooth_prices_min.index], smooth_prices_min.values, s=20, color='purple', label='Smoothed Prices Minima')
 ax.scatter(dates.loc[price_max.index], price_max.values, s=50, color='green', label='Prices Maxima')
 ax.scatter(dates.loc[price_min.index], price_min.values, s=50, color='blue', label='Prices Minima')
 ax.legend(loc='upper left')
 ax.grid()

代碼繪制了具有不同線條風(fēng)格的實(shí)際價(jià)格和平滑價(jià)格。該圖還顯示了實(shí)際和平滑價(jià)格數(shù)據(jù)中局部最大值和最小值的位置,可能識(shí)別交易進(jìn)入和退出信號(hào)。

為了區(qū)分最大值和最小值,使用較大的符號(hào)和不同的顏色。時(shí)間軸每隔一段時(shí)間顯示在x軸上,以使其更清晰。圖表的圖例解釋了情節(jié)元素,網(wǎng)格有助于分析價(jià)格隨時(shí)間的變化,這些都是在繪圖中必不可少的工作。

下面一個(gè)函數(shù)是Plot_window,它生成一個(gè)折線圖,顯示實(shí)際價(jià)格和平滑價(jià)格隨時(shí)間的變化。平滑可能有助于識(shí)別趨勢(shì)并過(guò)濾掉噪聲。在這張圖上可以區(qū)分出幾個(gè)關(guān)鍵點(diǎn)。顏色和大小用于識(shí)別實(shí)際和平滑價(jià)格曲線的局部最大值和最小高點(diǎn)和低點(diǎn)。交易策略通常關(guān)注這些關(guān)鍵點(diǎn),因?yàn)樗鼈兛赡茴A(yù)示著趨勢(shì)的逆轉(zhuǎn)或繼續(xù)。

def plot_window(dates, prices, smooth_prices, 
                 smooth_prices_max_indices, smooth_prices_min_indices,
                 price_max_indices, price_min_indices, 
                 start, end, ax=None):
     if ax is None: fig, ax = plt.subplots(figsize=(20,10), dpi=200)
 
     ax.plot(dates.loc[start:end], prices.loc[start:end], label='Prices')
     ax.plot(dates.loc[start:end], smooth_prices.loc[start:end], label='Smoothed Prices', linestyle='dashed')
     ax.set_xticks(np.linspace(0, len(dates.loc[start:end]), 10))
     ax.tick_params(axis='x', rotation=45)
 
     smooth_prices_max = smooth_prices.loc[smooth_prices_max_indices].loc[start:end]
     smooth_prices_min = smooth_prices.loc[smooth_prices_min_indices].loc[start:end]
     price_max = prices.loc[price_max_indices].loc[start:end]
     price_min = prices.loc[price_min_indices].loc[start:end]
 
     ax.scatter(dates.loc[smooth_prices_max.index], smooth_prices_max.values, s=20, color='red', label='Smoothed Prices Maxima')
     ax.scatter(dates.loc[smooth_prices_min.index], smooth_prices_min.values, s=20, color='purple', label='Smoothed Prices Minima')
 
     ax.scatter(dates.loc[price_max.index], price_max.values, s=50, color='green', label='Prices Maxima')
     ax.scatter(dates.loc[price_min.index], price_min.values, s=50, color='blue', label='Prices Minima')
     ax.legend(fontsize='small')
     ax.grid()

可以在較大的數(shù)據(jù)集中指定一個(gè)從開(kāi)始到結(jié)束的時(shí)間窗口,這樣可以查看數(shù)據(jù)的子集。為了清晰起見(jiàn),在x軸上顯示日期的同時(shí)還顯示了一個(gè)圖例和一個(gè)網(wǎng)格。

plot_window(dates, prices, smooth_prices, 
             smooth_prices_max_indices, smooth_prices_min_indices,
             price_max_indices, price_min_indices, 
             start=18, end=34, ax=None)

簡(jiǎn)單的模式

下面我們可以尋找一些簡(jiǎn)單的模式:

def find_patterns(max_min):
     patterns = defaultdict(list)
     for i in range(5, len(max_min)):
         window = max_min.iloc[i-5:i]
         # pattern must play out in less than 36 days
         if window.index[-1] - window.index[0] > 35:
             continue
         # Using the notation from the paper to avoid mistakes
         e1, e2, e3, e4, e5 = window.iloc[:5]
         rtop_g1 = np.mean([e1, e3, e5])
         rtop_g2 = np.mean([e2, e4])
         # Head and Shoulders
         if (e1 > e2) and (e3 > e1) and (e3 > e5) and \
             (abs(e1 - e5) <= 0.03*np.mean([e1,e5])) and \
             (abs(e2 - e4) <= 0.03*np.mean([e1,e5])):
                 patterns['HS'].append((window.index[0], window.index[-1]))
         # Inverse Head and Shoulders
         elif (e1 < e2) and (e3 < e1) and (e3 < e5) and \
             (abs(e1 - e5) <= 0.03*np.mean([e1,e5])) and \
             (abs(e2 - e4) <= 0.03*np.mean([e1,e5])):
                 patterns['IHS'].append((window.index[0], window.index[-1]))
         # Broadening Top
         elif (e1 > e2) and (e1 < e3) and (e3 < e5) and (e2 > e4):
             patterns['BTOP'].append((window.index[0], window.index[-1]))
         # Broadening Bottom
         elif (e1 < e2) and (e1 > e3) and (e3 > e5) and (e2 < e4):
             patterns['BBOT'].append((window.index[0], window.index[-1]))
         # Triangle Top
         elif (e1 > e2) and (e1 > e3) and (e3 > e5) and (e2 < e4):
             patterns['TTOP'].append((window.index[0], window.index[-1]))
         # Triangle Bottom
         elif (e1 < e2) and (e1 < e3) and (e3 < e5) and (e2 > e4):
             patterns['TBOT'].append((window.index[0], window.index[-1]))
         # Rectangle Top
         elif (e1 > e2) and (abs(e1-rtop_g1)/rtop_g1 < 0.0075) and \
             (abs(e3-rtop_g1)/rtop_g1 < 0.0075) and (abs(e5-rtop_g1)/rtop_g1 < 0.0075) and \
             (abs(e2-rtop_g2)/rtop_g2 < 0.0075) and (abs(e4-rtop_g2)/rtop_g2 < 0.0075) and \
             (min(e1, e3, e5) > max(e2, e4)):
             patterns['RTOP'].append((window.index[0], window.index[-1]))
         # Rectangle Bottom
         elif (e1 < e2) and (abs(e1-rtop_g1)/rtop_g1 < 0.0075) and \
             (abs(e3-rtop_g1)/rtop_g1 < 0.0075) and (abs(e5-rtop_g1)/rtop_g1 < 0.0075) and \
             (abs(e2-rtop_g2)/rtop_g2 < 0.0075) and (abs(e4-rtop_g2)/rtop_g2 < 0.0075) and \
             (max(e1, e3, e5) > min(e2, e4)):
             patterns['RBOT'].append((window.index[0], window.index[-1]))
     return patterns

迭代DataFrame中的條目,同時(shí)考慮5個(gè)數(shù)據(jù)點(diǎn)。確定每個(gè)5點(diǎn)窗口的模式是否在36天內(nèi)發(fā)生。如果沒(méi)有,則進(jìn)入到下一個(gè)窗口。我們這里有幾種類型的技術(shù)分析圖表模式:

Head and Shoulders(頭肩頂):

這是一種反轉(zhuǎn)圖表模式,通常表示股價(jià)在漲勢(shì)中即將反轉(zhuǎn)。它包括一個(gè)中間峰(頭)和兩個(gè)較低的峰(肩),形成一個(gè)上升趨勢(shì)的結(jié)束信號(hào)。

Inverse Head and Shoulders(倒頭肩底):

與頭肩頂相反,這是一種底部反轉(zhuǎn)圖表模式。它包括一個(gè)中間洼地(倒頭)和兩個(gè)較低的洼地(倒肩),形成一個(gè)下降趨勢(shì)的結(jié)束信號(hào)。

Broadening Top(擴(kuò)頂形態(tài)):

這是一種表示不穩(wěn)定市場(chǎng)的圖表模式,由兩個(gè)趨勢(shì)線分散開(kāi)來(lái)形成。它可能表示市場(chǎng)波動(dòng)性增加,預(yù)示價(jià)格的不確定性。

Broadening Bottom(擴(kuò)底形態(tài)):

與擴(kuò)頂形態(tài)相反,這是一種表示不穩(wěn)定市場(chǎng)的圖表模式,由兩個(gè)趨勢(shì)線逐漸匯聚。它可能表示市場(chǎng)波動(dòng)性增加,預(yù)示價(jià)格的不確定性。

Triangle Top(三角形頂部):

這是一種形成在上升趨勢(shì)中的圖表模式,由兩個(gè)趨勢(shì)線收斂形成三角形。它可能表示價(jià)格即將下降。

Triangle Bottom(三角形底部):

與三角形頂部相反,這是一種形成在下降趨勢(shì)中的圖表模式,由兩個(gè)趨勢(shì)線收斂形成三角形。它可能表示價(jià)格即將上升。

Rectangle Top(矩形頂部):

這是一種在上升趨勢(shì)中形成的圖表模式,由水平線形成一個(gè)矩形。它表示市場(chǎng)可能經(jīng)歷一段橫盤整理,價(jià)格可能會(huì)下跌。

Rectangle Bottom(矩形底部):

與矩形頂部相反,這是一種在下降趨勢(shì)中形成的圖表模式,由水平線形成一個(gè)矩形。它表示市場(chǎng)可能經(jīng)歷一段橫盤整理,價(jià)格可能會(huì)上升。

上面的這些模式是根據(jù)這些局部最大值和最小值的相對(duì)位置和值來(lái)識(shí)別的,檢測(cè)到的每個(gè)模式都存儲(chǔ)在一個(gè)字典中,模式名稱作為鍵,窗口的開(kāi)始和結(jié)束索引作為值。這些索引元組存儲(chǔ)在每個(gè)模式末尾的字典中。

這樣的代碼在算法交易中很有用,當(dāng)它自動(dòng)檢測(cè)與某些市場(chǎng)行為相關(guān)的歷史模式時(shí),允許交易者根據(jù)這些模式的存在做出明智的決策。

patterns = find_patterns(max_min)
 patterns

可視化

上面這些專有名字可能不太容易理解,所以我們可以使用代碼把它們進(jìn)行可視化

def visualize_patterns(dates, prices, smooth_prices, 
                        smooth_prices_max_indices, smooth_prices_min_indices, 
                        price_max_indices, price_min_indices, 
                        patterns, shorthand_fullname_dict):
     for name, end_day_nums in patterns.items():
         print('Pattern Identified: {} \nNumber of Observations: {}'.format(shorthand_fullname_dict[name], len(end_day_nums)))
         rows = int(np.ceil(len(end_day_nums)/2))
         fig, axes = plt.subplots(rows, 2, figsize=(20,5*rows), dpi=200)
         fig.subplots_adjust(hspace=0.5)
         axes = axes.flatten()
         i = 0
         for start_date, end_date in end_day_nums:
             plot_window(dates, prices, smooth_prices, 
                 smooth_prices_max_indices, smooth_prices_min_indices,
                 price_max_indices, price_min_indices, 
                 start=start_date-1, end=end_date+1, ax=axes[i])
             i += 1
         plt.show()
 visualize_patterns(dates, prices, smooth_prices, 
                        smooth_prices_max_indices, smooth_prices_min_indices, 
                        price_max_indices, price_min_indices, 
                        patterns, shorthand_fullname_dict)

可以看到各種模式是不一樣的,這對(duì)我們這些剛?cè)腴T金融行業(yè)的人來(lái)說(shuō)更容易理解。通過(guò)圖形化分析股票價(jià)格走勢(shì)和算法識(shí)別模式的工具,可以有助于我們更直觀地理解市場(chǎng)行為隨著時(shí)間的推移,這對(duì)算法交易至關(guān)重要。

以上就是使用Python代碼識(shí)別股票價(jià)格圖表模式實(shí)現(xiàn)的詳細(xì)內(nèi)容,更多關(guān)于Python識(shí)別股票價(jià)格圖表模式的資料請(qǐng)關(guān)注腳本之家其它相關(guān)文章!

相關(guān)文章

  • Python實(shí)現(xiàn)快速保存微信公眾號(hào)文章中的圖片

    Python實(shí)現(xiàn)快速保存微信公眾號(hào)文章中的圖片

    這篇文章主要為大家詳細(xì)介紹了如何利用Python語(yǔ)言實(shí)現(xiàn)快速保存微信公眾號(hào)文章中的圖片,文中的示例代碼講解詳細(xì),感興趣的可以嘗試一下
    2022-06-06
  • python psutil庫(kù)安裝教程

    python psutil庫(kù)安裝教程

    這篇文章給大家介紹了python psutil庫(kù)安裝教程,首先要確認(rèn)本機(jī)已安裝python環(huán)境,具體安裝過(guò)程大家參考下本文
    2018-03-03
  • python?Django實(shí)現(xiàn)增刪改查實(shí)戰(zhàn)代碼

    python?Django實(shí)現(xiàn)增刪改查實(shí)戰(zhàn)代碼

    這篇文章主要介紹了python?Django增刪改查快速體驗(yàn),本文通過(guò)實(shí)例代碼給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
    2022-02-02
  • python常用模塊詳解

    python常用模塊詳解

    今天小編就為大家分享一篇關(guān)于舉例講解Python常用模塊,小編覺(jué)得內(nèi)容挺不錯(cuò)的,現(xiàn)在分享給大家,具有很好的參考價(jià)值,需要的朋友一起跟隨小編來(lái)看看吧
    2021-10-10
  • Pygame與OpenCV聯(lián)合播放視頻并保證音畫同步

    Pygame與OpenCV聯(lián)合播放視頻并保證音畫同步

    Pygame的Movie模塊已經(jīng)廢棄多年,本文主要介紹了Pygame與OpenCV聯(lián)合播放視頻并保證音畫同步,文中通過(guò)示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2021-12-12
  • 使用Python實(shí)現(xiàn)分別輸出每個(gè)數(shù)組

    使用Python實(shí)現(xiàn)分別輸出每個(gè)數(shù)組

    今天小編就為大家分享一篇使用Python實(shí)現(xiàn)分別輸出每個(gè)數(shù)組,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧
    2019-12-12
  • python pprint模塊中print()和pprint()兩者的區(qū)別

    python pprint模塊中print()和pprint()兩者的區(qū)別

    這篇文章主要介紹了python pprint模塊中print()和pprint()兩者的區(qū)別,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2020-02-02
  • 超詳細(xì)Python文件操作命令知識(shí)

    超詳細(xì)Python文件操作命令知識(shí)

    最近在寫的程序頻繁地與文件操作打交道,所以想著給大家總結(jié)下,這篇文章主要給大家介紹了關(guān)于Python文件操作命令的相關(guān)資料,文中通過(guò)代碼介紹的非常詳細(xì),需要的朋友可以參考下
    2024-04-04
  • Python Sql數(shù)據(jù)庫(kù)增刪改查操作簡(jiǎn)單封裝

    Python Sql數(shù)據(jù)庫(kù)增刪改查操作簡(jiǎn)單封裝

    這篇文章主要為大家介紹了Python Sql數(shù)據(jù)庫(kù)增刪改查操作簡(jiǎn)單封裝,感興趣的小伙伴們可以參考一下
    2016-04-04
  • Pandas中Series的創(chuàng)建及數(shù)據(jù)類型轉(zhuǎn)換

    Pandas中Series的創(chuàng)建及數(shù)據(jù)類型轉(zhuǎn)換

    這篇文章主要介紹了Pandas中Series的創(chuàng)建及數(shù)據(jù)類型轉(zhuǎn)換,文章圍繞主題展開(kāi)詳細(xì)的內(nèi)容介紹,具有一定的參考價(jià)值,需要的小伙伴可以參考一下
    2022-08-08

最新評(píng)論