国产亚洲精品福利在线无卡一,国产精久久一区二区三区,亚洲精品无码国模,精品久久久久久无码专区不卡

當(dāng)前位置: 首頁(yè) > news >正文

連鎖店 網(wǎng)站建設(shè) 中企動(dòng)力seo搜索是什么

連鎖店 網(wǎng)站建設(shè) 中企動(dòng)力,seo搜索是什么,網(wǎng)站開發(fā)屬于軟件嗎,公眾號(hào)上傳 wordpress1、numpy.empty 作用:根據(jù)給定的維度和數(shù)值類型返回一個(gè)新的數(shù)組,其元素不進(jìn)行初始化。 用法:numpy.empty(shape, dtypefloat, order‘C’) 2、logging.debug 作用:Python 的日志記錄工具,這個(gè)模塊為應(yīng)用與庫(kù)實(shí)現(xiàn)了靈…

1、numpy.empty
作用:根據(jù)給定的維度和數(shù)值類型返回一個(gè)新的數(shù)組,其元素不進(jìn)行初始化。
用法:numpy.empty(shape, dtype=float, order=‘C’)

2、logging.debug
作用:Python 的日志記錄工具,這個(gè)模塊為應(yīng)用與庫(kù)實(shí)現(xiàn)了靈活的事件日志系統(tǒng)的函數(shù)與類。
在這里插入圖片描述
圖片來源:
https://docs.python.org/zh-cn/3/library/logging.html
https://blog.csdn.net/weixin_41724044/article/details/81784974

3、assert函數(shù)
https://docs.python.org/3/reference/simple_stmts.html#assert
作用:Python assert(斷言)用于判斷一個(gè)表達(dá)式,在表達(dá)式條件為 false 的時(shí)候觸發(fā)異常。斷言可以在條件不滿足程序運(yùn)行的情況下直接返回錯(cuò)誤,而不必等待程序運(yùn)行后出現(xiàn)崩潰的情況。
用法:assert expressionassert expression [, arguments]
如果expression是True,那么什么反應(yīng)都沒有。但是如果expression是False,那么會(huì)報(bào)錯(cuò)AssertionError。

4、np.where函數(shù)
(1)np.where(condition):返回值是滿足condition的元素的下標(biāo);
(2)np.where(condition, x, y):返回值是一個(gè)和condition的shape相同的numpy 數(shù)組,當(dāng)滿足條件condition時(shí),返回值中的元素從x中取,否則從y中取。

5、python讀取shapefile文件

import shapefile
sh=shapefile.Reader('./shp/shapefile_file.shp')
shapefile_records=sh.records()#records,according to arcgis fileds

6、python 中兩個(gè)//表示:地板除,即先做除法(/),然后向下取整(floor)。

7、python netcdf: making a copy of all variables and attributes but one
解決方法:https://stackoverflow.com/questions/15141563/python-netcdf-making-a-copy-of-all-variables-and-attributes-but-one
代碼:

import netCDF4 as nc
toexclude = ['ExcludeVar1', 'ExcludeVar2']with netCDF4.Dataset("in.nc") as src, netCDF4.Dataset("out.nc", "w") as dst:# copy global attributes all at once via dictionarydst.setncatts(src.__dict__)# copy dimensionsfor name, dimension in src.dimensions.items():dst.createDimension(name, (len(dimension) if not dimension.isunlimited() else None))# copy all file data except for the excludedfor name, variable in src.variables.items():if name not in toexclude:x = dst.createVariable(name, variable.datatype, variable.dimensions)dst[name][:] = src[name][:]# copy variable attributes all at once via dictionarydst[name].setncatts(src[name].__dict__)

或者(測(cè)試可用):

import netCDF4 as nc
import numpy as np
toexclude = ["TO_REMOVE"]
with nc.Dataset("orig.nc") as src, nc.Dataset("filtered.nc", "w") as dst:# copy attributesfor name in src.ncattrs():dst.setncattr(name, src.getncattr(name))# copy dimensionsfor name, dimension in src.dimensions.iteritems():dst.createDimension(name, (len(dimension) if not dimension.isunlimited else None))# copy all file data except for the excludedfor name, variable in src.variables.iteritems():if name not in toexclude:x = dst.createVariable(name, variable.datatype, variable.dimensions)dst.variables[name][:] = src.variables[name][:]

代碼來源:https://stackoverflow.com/questions/15141563/python-netcdf-making-a-copy-of-all-variables-and-attributes-but-one
Python setattr() 函數(shù):
功能:setattr() 函數(shù)對(duì)應(yīng)函數(shù) getattr(),用于設(shè)置屬性值,該屬性不一定是存在的。
用法:setattr(object, name, value)

8、dataframe and series
series 對(duì)象轉(zhuǎn)字符串:df[['station']] = pd.Series(df['station'], dtype="string")
篩選滿足條件的行:df_new = df.loc[df['station'].str.contains('姓名')]

Python將循環(huán)過程中產(chǎn)生的dataframe,按行合并,最終輸出一個(gè)csv文件:

merge_result = []
for file in os.listdir(csv_path):df = pd.read_csv(os.path.join(csv_path,file),header = None,names=['field1','field2'])merge_result .append(df_new)
df_all = pd.concat(merge_result , axis=0)

9、dataframe輸出csv文件,中文出現(xiàn)亂碼問題
https://blog.csdn.net/chenpe32cp/article/details/82150074

df.to_csv("result.csv",encoding="utf_8_sig")
http://aloenet.com.cn/news/41689.html

相關(guān)文章:

  • 小白測(cè)評(píng)做網(wǎng)站整合營(yíng)銷傳播成功案例
  • 做彩票網(wǎng)站用什么服務(wù)器2023年8月份新冠
  • 網(wǎng)站運(yùn)營(yíng)與管理的目的是合肥網(wǎng)絡(luò)推廣公司
  • 青島網(wǎng)頁(yè)制作設(shè)計(jì)營(yíng)銷寧波如何做seo排名優(yōu)化
  • 馬克杯網(wǎng)站開發(fā)百度seo怎么優(yōu)化
  • 成都企業(yè)網(wǎng)站開發(fā)公司上海app定制開發(fā)公司
  • wordpress添加功能搜索引擎優(yōu)化課程
  • 網(wǎng)站建設(shè)設(shè)計(jì)外包公司網(wǎng)絡(luò)營(yíng)銷的概念與特點(diǎn)
  • 網(wǎng)店怎么開新手寧波seo教程行業(yè)推廣
  • 中國(guó)建筑材料網(wǎng)福州seo代理商
  • 陜西省煤炭建設(shè)公司第一中學(xué)官方網(wǎng)站優(yōu)化網(wǎng)站視頻
  • django網(wǎng)站開發(fā)數(shù)據(jù)分析師資格證書怎么考
  • linux 國(guó)外網(wǎng)站網(wǎng)站建設(shè)蘇州
  • 石家莊+網(wǎng)站建設(shè)近期的時(shí)事熱點(diǎn)或新聞事件
  • 南京高端網(wǎng)站建設(shè)公司網(wǎng)絡(luò)廣告一般是怎么收費(fèi)
  • 圖書館 網(wǎng)站建設(shè)2022拉人頭最暴利的app
  • 海南建設(shè)銀行官方網(wǎng)站縱橫seo
  • 濟(jì)南哪家公司做網(wǎng)站微信指數(shù)是搜索量嗎
  • 怎么做wordpress主題模板福州seo網(wǎng)絡(luò)推廣
  • 刷qq會(huì)員自己做網(wǎng)站杭州正規(guī)引流推廣公司
  • 石家莊做網(wǎng)站建設(shè)的公司排名百度公司的發(fā)展歷程
  • 免費(fèi)網(wǎng)站制作公司優(yōu)化網(wǎng)站排名軟件
  • 女子醫(yī)院網(wǎng)站設(shè)計(jì)怎么做欒城seo整站排名
  • 用rp怎么做網(wǎng)站按鈕下拉菜單免費(fèi)發(fā)廣告的網(wǎng)站大全
  • 網(wǎng)站建設(shè)排期什么是網(wǎng)站推廣?
  • 福州網(wǎng)站建設(shè)哪家好班級(jí)優(yōu)化大師免費(fèi)下載安裝
  • 政府網(wǎng)站html5媒體平臺(tái)
  • 動(dòng)態(tài)網(wǎng)站商品瀏覽怎么做seo流量排名軟件
  • 注冊(cè)深圳公司的好處惠州抖音seo策劃
  • 網(wǎng)站后臺(tái)無法審核怎么把網(wǎng)站排名排上去