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

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)化
亚洲国产欧美在线人成人| 青青草原精品资源视频| 九九九热视频这里只有精品| 天堂av免费资源在线观看| 日韩在线中文字幕一区| 亚洲激情久热中文字幕| 高清亚洲一区二区三区| 国内精品久久大型新型| 精品日韩av一区二区三区| 這裏隻有无码人妻久久| 亚洲精品欧美日韩久久| 成人性生交视频免费看| 深夜视频在线观看成人| 国产av人妻精品一区二| 麻豆精东传媒一区二区| 欧美亚洲少妇人妻系列| 国产尹人99大香蕉| 国产日本欧美一区二区三区 | 99精品国产综合久久麻豆| 欧洲一区二区三区黄色| 午夜少妇福利在线观看| 综合激情网激情五月天| 就去吻色综合一二三四| 高清中文一区二区三区| 亚洲乱码中文字幕久久| 日本中文字幕三级专区| 97超碰97资源在线| av基地蜜桃蜜桃蜜桃| 国产精品一区二区三区激情 | 日本一区二区不卡二区| av人妻熟女少妇蒂亚| 亚洲日本欧美一区二区| 日本一区二区三区播放| 黄色国产一区二区三区| 中文字幕加勒比东京热| 青青草成人公开在线视频| 不卡一区二区黄色av| 人妻中文字幕在线一二区| 熟妇女人妻丰满少妇中文| 中文字幕乱码日韩一区| 青青草原一区在线观看|