欧美一级特黄大片做受成人-亚洲成人一区二区电影-激情熟女一区二区三区-日韩专区欧美专区国产专区

Pandas中split()方法如何使用

這期內(nèi)容當(dāng)中小編將會給大家?guī)碛嘘P(guān) Pandas中split()方法如何使用,文章內(nèi)容豐富且以專業(yè)的角度為大家分析和敘述,閱讀完這篇文章希望大家可以有所收獲。

創(chuàng)新互聯(lián)于2013年成立,先為開封等服務(wù)建站,開封等地企業(yè),進(jìn)行企業(yè)商務(wù)咨詢服務(wù)。為開封企業(yè)網(wǎng)站制作PC+手機(jī)+微官網(wǎng)三網(wǎng)同步一站式服務(wù)解決您的所有建站問題。

split()正序分割列;rsplit()逆序分割列
Series.str.split(pat=None, n=-1, expand=False)
參數(shù):
pat : 字符串,默認(rèn)使用空白分割.
n : 整型,默認(rèn)為-1,既使用所有的分割點(diǎn)分割
expand : 布爾值,默認(rèn)為False.如果為真返回數(shù)據(jù)框(DataFrame)或復(fù)雜索引(MultiIndex);如果為True,返回序列(Series)或者索引(Index).
return_type : 棄用,使用spand參數(shù)代替
返回值:
split : 參考expand參數(shù)

例子:
將一下列表按第一個空格分割成兩個列表,列表的名稱分別是“Property”和“Description”

Property Description
year The year of the datetime
month The month of the datetime
day The days of the datetime
hour The hour of the datetime
minute The minutes of the datetime
second The seconds of the datetime
microsecond The microseconds of the datetime
nanosecond The nanoseconds of the datetime
date Returns datetime.date (does not contain timezone information)
time Returns datetime.time (does not contain timezone information)
dayofyear The ordinal day of year
weekofyear The week ordinal of the year
week The week ordinal of the year
dayofweek The numer of the day of the week with Monday=0, Sunday=6
weekday The number of the day of the week with Monday=0, Sunday=6
weekday_name The name of the day in a week (ex: Friday)
quarter Quarter of the date: Jan=Mar = 1, Apr-Jun = 2, etc.
days_in_month The number of days in the month of the datetime
is_month_start Logical indicating if first day of month (defined by frequency)
is_month_end Logical indicating if last day of month (defined by frequency)
is_quarter_start Logical indicating if first day of quarter (defined by frequency)
is_quarter_end Logical indicating if last day of quarter (defined by frequency)
is_year_start Logical indicating if first day of year (defined by frequency)
is_year_end Logical indicating if last day of year (defined by frequency)
is_leap_year Logical indicating if the date belongs to a leap year
import pandas as pd
df=pd.read_excel("C:/Users/Administrator/Desktop/New Microsoft Excel 工作表.xlsx")#讀取工作表df["Property"],df["Description"]=df["Property Description"].str.split(" ",n=1).str#按第一個空格分割df.drop("Property Description",axis=1,inplace=True)#刪除原有的列df.to_csv("C:/Users/Administrator/Desktop/New Microsoft Excel 工作表.csv",index=False)#保存為csv,并刪除索引

結(jié)果如下圖所示:

PropertyDescription
yearThe year of the datetime
monthThe month of the datetime
dayThe days of the datetime
hourThe hour of the datetime
minuteThe minutes of the datetime
secondThe seconds of the datetime
microsecondThe microseconds of the datetime
nanosecondThe nanoseconds of the datetime
dateReturns datetime.date (does not contain timezone information)
timeReturns datetime.time (does not contain timezone information)
dayofyearThe ordinal day of year
weekofyearThe week ordinal of the year
weekThe week ordinal of the year
dayofweekThe numer of the day of the week with Monday=0, Sunday=6
weekdayThe number of the day of the week with Monday=0, Sunday=6
weekday_nameThe name of the day in a week (ex: Friday)
quarterQuarter of the date: Jan=Mar = 1, Apr-Jun = 2, etc.
days_in_monthThe number of days in the month of the datetime
is_month_startLogical indicating if first day of month (defined by frequency)
is_month_endLogical indicating if last day of month (defined by frequency)
is_quarter_startLogical indicating if first day of quarter (defined by frequency)
is_quarter_endLogical indicating if last day of quarter (defined by frequency)
is_year_startLogical indicating if first day of year (defined by frequency)
is_year_endLogical indicating if last day of year (defined by frequency)
is_leap_yearLogical indicating if the date belongs to a leap year

上述就是小編為大家分享的 Pandas中split()方法如何使用了,如果剛好有類似的疑惑,不妨參照上述分析進(jìn)行理解。如果想知道更多相關(guān)知識,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道。

網(wǎng)站標(biāo)題:Pandas中split()方法如何使用
網(wǎng)站URL:http://aaarwkj.com/article2/jeidoc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站設(shè)計公司、ChatGPT手機(jī)網(wǎng)站建設(shè)、App設(shè)計網(wǎng)站改版、網(wǎng)站策劃

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

搜索引擎優(yōu)化
亚洲国产熟女导航网站视频| 亚洲国产欧美日韩在线| 日本欧美三级高潮受不了| 91九色最新国产在线| 欧美日韩国内在线视频| 亚洲成av人一区二区三区| 国产伦理自拍视频在线观看| 麻豆专区一区二区三区| 免费国产三级在线观看| 丰满少妇一级淫片在线播放| 久久99热最新地址获取| 视频精品一区二区在线观看| 亚洲av激情码国产一区| 国产中文字幕有码视频| 日韩欧美精品在线不卡| 不卡一区二区黄色av| 欧美亚洲av一区二区三区| 中文字幕久久熟女蜜桃| 国产精品久久中文字幕亚洲| 亚洲欧美日韩综合久久| 国产传媒在线免费播放| 亚洲精品中国一区二区久久| 日本一级二级三级在线看| 国产精品自产拍在线网站| 亚洲一区二区三区黄色| 一区二区三区在线观看美女视频 | 婷婷六月亚洲激情综合| 亚洲人妻一区二区久久| 国产一区二区三区区别| 天天操夜夜操狠狠操91| 羞涩插射视频网站在线观看| 精品欧美高清免费视频| 国内精品自拍亚洲视频| 国产av剧情一区二区| 黄色日韩欧美在线观看| 女同同性av观看免费| 国产欧美又粗又猛又爽老| 最新国产情侣夫妻激情| 久久精品国产亚洲七七| 国欧美一区二区三区| 欧美香蕉视频播放二区|