import{S as u4,i as m4,s as _4,e as l,k as f,t as a,w as m,M as h4,c as r,d as e,m as d,a as o,h as n,x as _,b as v,f as d4,G as s,g as p,y as h,q as c,o as g,B as $,v as c4}from"../../chunks/vendor-hf-doc-builder.js";import{T as Qs}from"../../chunks/Tip-hf-doc-builder.js";import{Y as H$}from"../../chunks/Youtube-hf-doc-builder.js";import{I as F$}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{C as w}from"../../chunks/CodeBlock-hf-doc-builder.js";import{C as g4}from"../../chunks/CourseFloatingBanner-hf-doc-builder.js";import"../../chunks/DocNotebookDropdown-hf-doc-builder.js";function $4(z){let u,b,j,E,G,x,k,q;return{c(){u=l("p"),b=a("\u270F\uFE0F "),j=l("strong"),E=a("\u8BD5\u8BD5\u770B\uFF01"),G=a(" \u4F7F\u7528 "),x=l("code"),k=a("Dataset.unique()"),q=a(" \u51FD\u6570\u67E5\u627E\u8BAD\u7EC3\u548C\u6D4B\u8BD5\u96C6\u4E2D\u6EE1\u8DB3\u67D0\u4E2A\u6761\u4EF6\u7684\u836F\u7269\u7ECF\u8FC7\u53BB\u91CD\u4E4B\u540E\u7684\u6570\u91CF\u3002")},l(N){u=r(N,"P",{});var O=o(u);b=n(O,"\u270F\uFE0F "),j=r(O,"STRONG",{});var A=o(j);E=n(A,"\u8BD5\u8BD5\u770B\uFF01"),A.forEach(e),G=n(O," \u4F7F\u7528 "),x=r(O,"CODE",{});var C=o(x);k=n(C,"Dataset.unique()"),C.forEach(e),q=n(O," \u51FD\u6570\u67E5\u627E\u8BAD\u7EC3\u548C\u6D4B\u8BD5\u96C6\u4E2D\u6EE1\u8DB3\u67D0\u4E2A\u6761\u4EF6\u7684\u836F\u7269\u7ECF\u8FC7\u53BB\u91CD\u4E4B\u540E\u7684\u6570\u91CF\u3002"),O.forEach(e)},m(N,O){p(N,u,O),s(u,b),s(u,j),s(j,E),s(u,G),s(u,x),s(x,k),s(u,q)},d(N){N&&e(u)}}}function v4(z){let u,b;return{c(){u=l("p"),b=a("\u{1F64B}\u5411\u6570\u636E\u96C6\u6DFB\u52A0\u65B0\u5217\u7684\u53E6\u4E00\u79CD\u65B9\u6CD5\u662F\u4F7F\u7528\u51FD\u6570Dataset.add_column() \u3002\u8FD9\u5141\u8BB8\u60A8\u8F93\u5165Python \u5217\u8868\u6216 NumPy\uFF0C\u5728\u4E0D\u9002\u5408\u4F7F\u7528Dataset.map()\u60C5\u51B5\u4E0B\u53EF\u4EE5\u5F88\u65B9\u4FBF\u3002")},l(j){u=r(j,"P",{});var E=o(u);b=n(E,"\u{1F64B}\u5411\u6570\u636E\u96C6\u6DFB\u52A0\u65B0\u5217\u7684\u53E6\u4E00\u79CD\u65B9\u6CD5\u662F\u4F7F\u7528\u51FD\u6570Dataset.add_column() \u3002\u8FD9\u5141\u8BB8\u60A8\u8F93\u5165Python \u5217\u8868\u6216 NumPy\uFF0C\u5728\u4E0D\u9002\u5408\u4F7F\u7528Dataset.map()\u60C5\u51B5\u4E0B\u53EF\u4EE5\u5F88\u65B9\u4FBF\u3002"),E.forEach(e)},m(j,E){p(j,u,E),s(u,b)},d(j){j&&e(u)}}}function w4(z){let u,b;return{c(){u=l("p"),b=a("\u270F\uFE0F \u8BD5\u8BD5\u770B\uFF01\u4F7F\u7528 Dataset.sort() \u51FD\u6570\u67E5\u770B\u5355\u8BCD\u6570\u6700\u591A\u7684\u8BC4\u8BBA\u3002\u8BF7\u53C2\u9605\u6587\u6863\u4EE5\u4E86\u89E3\u60A8\u9700\u8981\u4F7F\u7528\u54EA\u4E2A\u53C2\u6570\u6309\u957F\u5EA6\u964D\u5E8F\u5BF9\u8BC4\u8BBA\u8FDB\u884C\u6392\u5E8F\u3002")},l(j){u=r(j,"P",{});var E=o(u);b=n(E,"\u270F\uFE0F \u8BD5\u8BD5\u770B\uFF01\u4F7F\u7528 Dataset.sort() \u51FD\u6570\u67E5\u770B\u5355\u8BCD\u6570\u6700\u591A\u7684\u8BC4\u8BBA\u3002\u8BF7\u53C2\u9605\u6587\u6863\u4EE5\u4E86\u89E3\u60A8\u9700\u8981\u4F7F\u7528\u54EA\u4E2A\u53C2\u6570\u6309\u957F\u5EA6\u964D\u5E8F\u5BF9\u8BC4\u8BBA\u8FDB\u884C\u6392\u5E8F\u3002"),E.forEach(e)},m(j,E){p(j,u,E),s(u,b)},d(j){j&&e(u)}}}function j4(z){let u,b,j,E,G,x,k,q,N,O,A,C,U,ut;return{c(){u=l("p"),b=a("\u270F\uFE0F "),j=l("strong"),E=a("\u8BD5\u8BD5\u770B\uFF01"),G=a(" \u4F7F\u7528\u548C\u4E0D\u4F7F\u7528 "),x=l("code"),k=a("batched=True"),q=a(" \u6267\u884C\u76F8\u540C\u7684\u6307\u4EE4\uFF0C\u7136\u540E\u4F7F\u7528\u6162\u901F\u6807\u8BB0\u5668\u5C1D\u8BD5\uFF08\u5728 "),N=l("code"),O=a("AutoTokenizer.from_pretrained()"),A=a(" \u65B9\u6CD5\u4E2D\u6DFB\u52A0 "),C=l("code"),U=a("use_fast=False"),ut=a("\uFF09\uFF0C\u8FD9\u6837\u4F60\u5C31\u53EF\u4EE5\u770B\u770B\u5728\u4F60\u7684\u7535\u8111\u4E0A\u5B83\u9700\u8981\u591A\u957F\u7684\u65F6\u95F4\u3002")},l(M){u=r(M,"P",{});var T=o(u);b=n(T,"\u270F\uFE0F "),j=r(T,"STRONG",{});var $t=o(j);E=n($t,"\u8BD5\u8BD5\u770B\uFF01"),$t.forEach(e),G=n(T," \u4F7F\u7528\u548C\u4E0D\u4F7F\u7528 "),x=r(T,"CODE",{});var V=o(x);k=n(V,"batched=True"),V.forEach(e),q=n(T," \u6267\u884C\u76F8\u540C\u7684\u6307\u4EE4\uFF0C\u7136\u540E\u4F7F\u7528\u6162\u901F\u6807\u8BB0\u5668\u5C1D\u8BD5\uFF08\u5728 "),N=r(T,"CODE",{});var vt=o(N);O=n(vt,"AutoTokenizer.from_pretrained()"),vt.forEach(e),A=n(T," \u65B9\u6CD5\u4E2D\u6DFB\u52A0 "),C=r(T,"CODE",{});var wt=o(C);U=n(wt,"use_fast=False"),wt.forEach(e),ut=n(T,"\uFF09\uFF0C\u8FD9\u6837\u4F60\u5C31\u53EF\u4EE5\u770B\u770B\u5728\u4F60\u7684\u7535\u8111\u4E0A\u5B83\u9700\u8981\u591A\u957F\u7684\u65F6\u95F4\u3002"),T.forEach(e)},m(M,T){p(M,u,T),s(u,b),s(u,j),s(j,E),s(u,G),s(u,x),s(x,k),s(u,q),s(u,N),s(N,O),s(u,A),s(u,C),s(C,U),s(u,ut)},d(M){M&&e(u)}}}function E4(z){let u,b;return{c(){u=l("p"),b=a("\u4F7F\u7528num_proc\u4EE5\u52A0\u5FEB\u5904\u7406\u901F\u5EA6\u901A\u5E38\u662F\u4E00\u4E2A\u597D\u4E3B\u610F\uFF0C\u53EA\u8981\u60A8\u4F7F\u7528\u7684\u51FD\u6570\u8FD8\u6CA1\u6709\u81EA\u5DF1\u5E26\u6709\u7684\u8FDB\u884C\u67D0\u79CD\u591A\u8FDB\u7A0B\u5904\u7406\u7684\u65B9\u6CD5\u3002")},l(j){u=r(j,"P",{});var E=o(u);b=n(E,"\u4F7F\u7528num_proc\u4EE5\u52A0\u5FEB\u5904\u7406\u901F\u5EA6\u901A\u5E38\u662F\u4E00\u4E2A\u597D\u4E3B\u610F\uFF0C\u53EA\u8981\u60A8\u4F7F\u7528\u7684\u51FD\u6570\u8FD8\u6CA1\u6709\u81EA\u5DF1\u5E26\u6709\u7684\u8FDB\u884C\u67D0\u79CD\u591A\u8FDB\u7A0B\u5904\u7406\u7684\u65B9\u6CD5\u3002"),E.forEach(e)},m(j,E){p(j,u,E),s(u,b)},d(j){j&&e(u)}}}function b4(z){let u,b;return{c(){u=l("p"),b=a("\u{1F4A1}\u5728\u673A\u5668\u5B66\u4E60\u4E2D\uFF0C\u4E00\u4E2A\u4F8B\u5B50\u901A\u5E38\u53EF\u4EE5\u4E3A\u6211\u4EEC\u7684\u6A21\u578B\u63D0\u4F9B\u4E00\u7EC4\u7279\u5F81\u3002\u5728\u67D0\u4E9B\u60C5\u51B5\u4E0B\uFF0C\u8FD9\u4E9B\u7279\u5F81\u4F1A\u50A8\u5B58\u5728\u6570\u636E\u96C6\u7684\u51E0\u4E2A\u5217\uFF0C\u4F46\u5728\u5176\u4ED6\u60C5\u51B5\u4E0B\uFF08\u4F8B\u5982\u6B64\u5904\u7684\u4F8B\u5B50\u548C\u7528\u4E8E\u95EE\u7B54\u7684\u6570\u636E\uFF09\uFF0C\u53EF\u4EE5\u4ECE\u5355\u4E2A\u793A\u4F8B\u7684\u4E00\u5217\u4E2D\u63D0\u53D6\u591A\u4E2A\u7279\u5F81")},l(j){u=r(j,"P",{});var E=o(u);b=n(E,"\u{1F4A1}\u5728\u673A\u5668\u5B66\u4E60\u4E2D\uFF0C\u4E00\u4E2A\u4F8B\u5B50\u901A\u5E38\u53EF\u4EE5\u4E3A\u6211\u4EEC\u7684\u6A21\u578B\u63D0\u4F9B\u4E00\u7EC4\u7279\u5F81\u3002\u5728\u67D0\u4E9B\u60C5\u51B5\u4E0B\uFF0C\u8FD9\u4E9B\u7279\u5F81\u4F1A\u50A8\u5B58\u5728\u6570\u636E\u96C6\u7684\u51E0\u4E2A\u5217\uFF0C\u4F46\u5728\u5176\u4ED6\u60C5\u51B5\u4E0B\uFF08\u4F8B\u5982\u6B64\u5904\u7684\u4F8B\u5B50\u548C\u7528\u4E8E\u95EE\u7B54\u7684\u6570\u636E\uFF09\uFF0C\u53EF\u4EE5\u4ECE\u5355\u4E2A\u793A\u4F8B\u7684\u4E00\u5217\u4E2D\u63D0\u53D6\u591A\u4E2A\u7279\u5F81"),E.forEach(e)},m(j,E){p(j,u,E),s(u,b)},d(j){j&&e(u)}}}function x4(z){let u,b,j,E,G,x,k,q,N,O,A,C,U,ut,M,T,$t,V,vt,wt,mt,Zs,te,at,se,ee;return{c(){u=l("p"),b=a("\u{1F6A8} \u5728\u5E95\u5C42\uFF0C"),j=l("code"),E=a("Dataset.set_format()"),G=a(" \u6539\u53D8\u4E86\u6570\u636E\u96C6\u7684 "),x=l("code"),k=a("__getitem__()"),q=a(" dunder \u65B9\u6CD5\u7684\u8FD4\u56DE\u683C\u5F0F\u3002 \u8FD9\u610F\u5473\u7740\u5F53\u6211\u4EEC\u60F3\u4ECE "),N=l("code"),O=a('"pandas"'),A=a(" \u683C\u5F0F\u7684 "),C=l("code"),U=a("Dataset"),ut=a(" \u4E2D\u521B\u5EFA\u50CF "),M=l("code"),T=a("train_df"),$t=a(" \u8FD9\u6837\u7684\u65B0\u5BF9\u8C61\u65F6\uFF0C\u6211\u4EEC\u9700\u8981\u5BF9\u6574\u4E2A\u6570\u636E\u96C6\u8FDB\u884C\u5207\u7247\u4EE5\u83B7\u5F97 "),V=l("code"),vt=a("pandas.DataFrame"),wt=a("\u3002 \u65E0\u8BBA\u8F93\u51FA\u683C\u5F0F\u5982\u4F55\uFF0C\u60A8\u90FD\u53EF\u4EE5\u81EA\u5DF1\u9A8C\u8BC1 "),mt=l("code"),Zs=a('drug_dataset["train"]'),te=a(" \u7684\u7C7B\u578B\u4F9D\u7136\u8FD8\u662F "),at=l("code"),se=a("Dataset"),ee=a("\u3002")},l(_t){u=r(_t,"P",{});var D=o(u);b=n(D,"\u{1F6A8} \u5728\u5E95\u5C42\uFF0C"),j=r(D,"CODE",{});var Na=o(j);E=n(Na,"Dataset.set_format()"),Na.forEach(e),G=n(D," \u6539\u53D8\u4E86\u6570\u636E\u96C6\u7684 "),x=r(D,"CODE",{});var ae=o(x);k=n(ae,"__getitem__()"),ae.forEach(e),q=n(D," dunder \u65B9\u6CD5\u7684\u8FD4\u56DE\u683C\u5F0F\u3002 \u8FD9\u610F\u5473\u7740\u5F53\u6211\u4EEC\u60F3\u4ECE "),N=r(D,"CODE",{});var tt=o(N);O=n(tt,'"pandas"'),tt.forEach(e),A=n(D," \u683C\u5F0F\u7684 "),C=r(D,"CODE",{});var Oa=o(C);U=n(Oa,"Dataset"),Oa.forEach(e),ut=n(D," \u4E2D\u521B\u5EFA\u50CF "),M=r(D,"CODE",{});var jt=o(M);T=n(jt,"train_df"),jt.forEach(e),$t=n(D," \u8FD9\u6837\u7684\u65B0\u5BF9\u8C61\u65F6\uFF0C\u6211\u4EEC\u9700\u8981\u5BF9\u6574\u4E2A\u6570\u636E\u96C6\u8FDB\u884C\u5207\u7247\u4EE5\u83B7\u5F97 "),V=r(D,"CODE",{});var Sa=o(V);vt=n(Sa,"pandas.DataFrame"),Sa.forEach(e),wt=n(D,"\u3002 \u65E0\u8BBA\u8F93\u51FA\u683C\u5F0F\u5982\u4F55\uFF0C\u60A8\u90FD\u53EF\u4EE5\u81EA\u5DF1\u9A8C\u8BC1 "),mt=r(D,"CODE",{});var Ra=o(mt);Zs=n(Ra,'drug_dataset["train"]'),Ra.forEach(e),te=n(D," \u7684\u7C7B\u578B\u4F9D\u7136\u8FD8\u662F "),at=r(D,"CODE",{});var Et=o(at);se=n(Et,"Dataset"),Et.forEach(e),ee=n(D,"\u3002"),D.forEach(e)},m(_t,D){p(_t,u,D),s(u,b),s(u,j),s(j,E),s(u,G),s(u,x),s(x,k),s(u,q),s(u,N),s(N,O),s(u,A),s(u,C),s(C,U),s(u,ut),s(u,M),s(M,T),s(u,$t),s(u,V),s(V,vt),s(u,wt),s(u,mt),s(mt,Zs),s(u,te),s(u,at),s(at,se),s(u,ee)},d(_t){_t&&e(u)}}}function T4(z){let u,b,j,E,G;return{c(){u=l("p"),b=a("\u270F\uFE0F "),j=l("strong"),E=a("\u8BD5\u8BD5\u770B\uFF01"),G=a(" \u8BA1\u7B97\u6BCF\u79CD\u836F\u7269\u7684\u5E73\u5747\u8BC4\u7EA7\u5E76\u5C06\u7ED3\u679C\u5B58\u50A8\u5728\u4E00\u4E2A\u65B0\u7684Dataset.")},l(x){u=r(x,"P",{});var k=o(u);b=n(k,"\u270F\uFE0F "),j=r(k,"STRONG",{});var q=o(j);E=n(q,"\u8BD5\u8BD5\u770B\uFF01"),q.forEach(e),G=n(k," \u8BA1\u7B97\u6BCF\u79CD\u836F\u7269\u7684\u5E73\u5747\u8BC4\u7EA7\u5E76\u5C06\u7ED3\u679C\u5B58\u50A8\u5728\u4E00\u4E2A\u65B0\u7684Dataset."),k.forEach(e)},m(x,k){p(x,u,k),s(u,b),s(u,j),s(j,E),s(u,G)},d(x){x&&e(u)}}}function D4(z){let u,b,j,E,G,x,k,q,N,O,A,C,U,ut,M,T,$t,V,vt,wt,mt,Zs,te,at,se,ee,_t,D,Na,ae,tt,Oa,jt,Sa,Ra,Et,iu,pu,Ci,bt,fu,wl,du,uu,jl,mu,_u,zi,ne,Ai,xt,hu,El,cu,gu,bl,$u,vu,Ii,le,Hi,Tt,wu,xl,ju,Eu,Tl,bu,xu,Fi,re,Li,oe,Mi,nt,Tu,Dl,Du,ku,kl,yu,qu,yl,Nu,Ou,Bi,Dt,Pa,ql,Su,Ru,Pu,Ga,Nl,Gu,Cu,zu,Vt,Au,Ol,Iu,Hu,Sl,Fu,Lu,Ji,kt,Mu,Rl,Bu,Ju,Pl,Uu,Vu,Ui,ie,Vi,yt,Yu,Gl,Wu,Xu,Cl,Ku,Qu,Yi,pe,Wi,fe,Xi,us,Ki,Y,Zu,zl,tm,sm,Al,em,am,Ca,nm,lm,Il,rm,om,Qi,de,Zi,ue,tp,W,im,Hl,pm,fm,Fl,dm,um,Ll,mm,_m,Ml,hm,cm,sp,me,ep,ms,gm,Bl,$m,vm,ap,_e,np,X,wm,Jl,jm,Em,he,bm,xm,Ul,Tm,Dm,Vl,km,ym,lp,ce,rp,za,qm,op,ge,ip,$e,pp,Aa,Nm,fp,ve,dp,we,up,qt,Om,je,Sm,Rm,Yl,Pm,Gm,mp,Ee,_p,Nt,Cm,Wl,zm,Am,Xl,Im,Hm,hp,be,cp,xe,gp,Ia,Fm,$p,Yt,_s,Kl,Te,Lm,Ql,Mm,vp,Ha,Bm,wp,Fa,Jm,jp,De,Ep,B,Um,Zl,Vm,Ym,tr,Wm,Xm,sr,Km,Qm,er,Zm,t_,ar,s_,e_,bp,ke,xp,ye,Tp,Ot,a_,nr,n_,l_,lr,r_,o_,Dp,qe,kp,Ne,yp,La,i_,qp,hs,Np,St,p_,rr,f_,d_,or,u_,m_,Op,Oe,Sp,Se,Rp,Ma,__,Pp,cs,Gp,gs,h_,ir,c_,g_,Cp,Re,zp,Pe,Ap,$s,$_,pr,v_,w_,Ip,Ge,Hp,vs,j_,fr,E_,b_,Fp,Wt,ws,dr,Ce,x_,ur,T_,Lp,ht,mr,D_,k_,_r,y_,q_,hr,N_,O_,Mp,K,S_,cr,R_,P_,gr,G_,C_,$r,z_,A_,vr,I_,H_,Bp,ze,Jp,Rt,F_,wr,L_,M_,jr,B_,J_,Up,lt,U_,Ba,V_,Y_,Er,W_,X_,br,K_,Q_,Vp,Ae,Yp,rt,Z_,Ja,th,sh,xr,eh,ah,Tr,nh,lh,Wp,Ie,Xp,js,rh,Dr,oh,ih,Kp,Es,Qp,Ua,ph,Zp,bs,kr,Xt,Va,fh,dh,Ya,uh,mh,Wa,_h,hh,He,Kt,Xa,yr,ch,gh,Ka,$h,vh,Qa,wh,jh,Qt,Za,qr,Eh,bh,tn,xh,Th,sn,Dh,tf,ot,kh,Nr,yh,qh,Or,Nh,Oh,Sr,Sh,Rh,sf,en,Ph,ef,ct,Rr,Gh,Ch,Pr,zh,Ah,Gr,Ih,Hh,af,Fe,nf,an,Fh,lf,xs,Cr,Zt,nn,Lh,Mh,ln,Bh,Jh,rn,Uh,Vh,gt,ts,on,zr,Yh,Wh,pn,Xh,Kh,fn,Qh,Zh,ss,dn,Ar,tc,sc,un,ec,ac,mn,nc,lc,es,Ts,Ir,rc,oc,Hr,ic,pc,_n,fc,dc,hn,uc,mc,as,Ds,Fr,_c,hc,Lr,cc,gc,cn,$c,vc,gn,wc,rf,Q,jc,Mr,Ec,bc,Br,xc,Tc,Jr,Dc,kc,Ur,yc,qc,of,ks,pf,it,Nc,Vr,Oc,Sc,Yr,Rc,Pc,$n,Gc,Cc,ff,ys,df,qs,zc,Wr,Ac,Ic,uf,Le,mf,Ns,Hc,Xr,Fc,Lc,_f,Me,hf,Be,cf,vn,Mc,gf,Je,$f,Ue,vf,wn,Bc,wf,Z,Jc,Kr,Uc,Vc,Qr,Yc,Wc,Zr,Xc,Kc,to,Qc,Zc,jf,Ve,Ef,jn,t2,bf,Ye,xf,We,Tf,Pt,s2,so,e2,a2,eo,n2,l2,Df,Xe,kf,Os,r2,ao,o2,i2,yf,Ke,qf,Qe,Nf,En,p2,Of,Ss,f2,no,d2,u2,Sf,ns,Rs,lo,Ze,m2,ro,_2,Rf,ta,Pf,Ps,h2,oo,c2,g2,Gf,sa,Cf,Gs,$2,io,v2,w2,zf,ea,Af,Gt,po,y,If,j2,fo,E2,b2,uo,x2,T2,mo,D2,k2,_o,y2,q2,ho,N2,O2,co,S2,R2,go,P2,G2,$o,C2,z2,ls,S,vo,A2,I2,wo,H2,F2,jo,L2,M2,Eo,B2,J2,bo,U2,V2,xo,Y2,W2,To,X2,K2,Do,Q2,Z2,ko,tg,sg,R,yo,eg,ag,qo,ng,lg,No,rg,og,Oo,ig,pg,So,fg,dg,Ro,ug,mg,Po,_g,hg,Go,cg,gg,Co,$g,vg,P,zo,wg,jg,Ao,Eg,bg,Io,xg,Tg,Ho,Dg,kg,Fo,yg,qg,Lo,Ng,Og,Mo,Sg,Rg,Bo,Pg,Gg,Jo,Cg,Hf,Ct,zg,Uo,Ag,Ig,Vo,Hg,Fg,Ff,aa,Lf,Cs,Mf,zs,Lg,Yo,Mg,Bg,Bf,na,Jf,zt,Wo,At,Uf,Jg,Xo,Ug,Vg,Ko,Yg,Wg,st,rs,Qo,Xg,Kg,Zo,Qg,Zg,ti,t1,s1,os,si,e1,a1,ei,n1,l1,ai,r1,o1,is,ni,i1,p1,li,f1,d1,ri,u1,m1,ps,oi,_1,h1,ii,c1,g1,pi,$1,v1,fs,fi,w1,j1,di,E1,b1,ui,x1,Vf,It,T1,mi,D1,k1,_i,y1,q1,Yf,la,Wf,ra,Xf,As,Kf,pt,N1,hi,O1,S1,ci,R1,P1,gi,G1,C1,Qf,oa,Zf,ia,z1,td,bn,A1,sd,J,I1,$i,H1,F1,vi,L1,M1,wi,B1,J1,ji,U1,V1,Ei,Y1,W1,ed,pa,ad,fa,nd,xn,X1,ld,da,K1,rd,ua,od,Tn,Q1,id,Is,bi,ma,Dn,Z1,t$,kn,s$,e$,ds,_a,yn,a$,n$,qn,xi,l$,r$,ha,Nn,o$,i$,On,Ti,p$,f$,ca,Sn,d$,u$,Rn,Di,m$,pd,Pn,_$,fd,ga,dd,Gn,h$,ud,$a,md,Cn,c$,_d,Hs,g$,ki,$$,v$,hd,va,cd,wa,gd,Fs,w$,yi,j$,E$,$d,ja,vd,Ls,b$,Ea,x$,T$,wd,ba,jd,xa,Ed,Ms,D$,zn,k$,y$,bd,Ta,xd,An,q$,Td,Bs,Da,N$,In,O$,S$,R$,ka,P$,Hn,G$,C$,Dd,Fn,z$,kd;return x=new g4({props:{chapter:5,classNames:"absolute z-10 right-0 top-0",notebooks:[{label:"Google Colab",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/master/course/zh-CN/chapter5/section3.ipynb"},{label:"Aws Studio",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/master/course/zh-CN/chapter5/section3.ipynb"}]}}),A=new H$({props:{id:"tqfSFcPMgOI"}}),ne=new w({props:{code:`!wget "https://archive.ics.uci.edu/ml/machine-learning-databases/00462/drugsCom_raw.zip"
!unzip drugsCom_raw.zip`,highlighted:`!wget <span class="hljs-string">&quot;https://archive.ics.uci.edu/ml/machine-learning-databases/00462/drugsCom_raw.zip&quot;</span>
!unzip drugsCom_raw.<span class="hljs-built_in">zip</span>`}}),le=new w({props:{code:`from datasets import load_dataset

data_files = {"train": "drugsComTrain_raw.tsv", "test": "drugsComTest_raw.tsv"}
# \\t is the tab character in Python
drug_dataset = load_dataset("csv", data_files=data_files, delimiter="\\t")`,highlighted:`<span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

data_files = {<span class="hljs-string">&quot;train&quot;</span>: <span class="hljs-string">&quot;drugsComTrain_raw.tsv&quot;</span>, <span class="hljs-string">&quot;test&quot;</span>: <span class="hljs-string">&quot;drugsComTest_raw.tsv&quot;</span>}
<span class="hljs-comment"># \\t is the tab character in Python</span>
drug_dataset = load_dataset(<span class="hljs-string">&quot;csv&quot;</span>, data_files=data_files, delimiter=<span class="hljs-string">&quot;\\t&quot;</span>)`}}),re=new w({props:{code:`drug_sample = drug_dataset["train"].shuffle(seed=42).select(range(1000))
# Peek at the first few examples
drug_sample[:3]`,highlighted:`drug_sample = drug_dataset[<span class="hljs-string">&quot;train&quot;</span>].shuffle(seed=<span class="hljs-number">42</span>).select(<span class="hljs-built_in">range</span>(<span class="hljs-number">1000</span>))
<span class="hljs-comment"># Peek at the first few examples</span>
drug_sample[:<span class="hljs-number">3</span>]`}}),oe=new w({props:{code:`{'Unnamed: 0': [87571, 178045, 80482],
 'drugName': ['Naproxen', 'Duloxetine', 'Mobic'],
 'condition': ['Gout, Acute', 'ibromyalgia', 'Inflammatory Conditions'],
 'review': ['"like the previous person mention, I&#039;m a strong believer of aleve, it works faster for my gout than the prescription meds I take. No more going to the doctor for refills.....Aleve works!"',
  '"I have taken Cymbalta for about a year and a half for fibromyalgia pain. It is great\\r\\nas a pain reducer and an anti-depressant, however, the side effects outweighed \\r\\nany benefit I got from it. I had trouble with restlessness, being tired constantly,\\r\\ndizziness, dry mouth, numbness and tingling in my feet, and horrible sweating. I am\\r\\nbeing weaned off of it now. Went from 60 mg to 30mg and now to 15 mg. I will be\\r\\noff completely in about a week. The fibro pain is coming back, but I would rather deal with it than the side effects."',
  '"I have been taking Mobic for over a year with no side effects other than an elevated blood pressure.  I had severe knee and ankle pain which completely went away after taking Mobic.  I attempted to stop the medication however pain returned after a few days."'],
 'rating': [9.0, 3.0, 10.0],
 'date': ['September 2, 2015', 'November 7, 2011', 'June 5, 2013'],
 'usefulCount': [36, 13, 128]}`,highlighted:`{<span class="hljs-string">&#x27;Unnamed: 0&#x27;</span>: [<span class="hljs-number">87571</span>, <span class="hljs-number">178045</span>, <span class="hljs-number">80482</span>],
 <span class="hljs-string">&#x27;drugName&#x27;</span>: [<span class="hljs-string">&#x27;Naproxen&#x27;</span>, <span class="hljs-string">&#x27;Duloxetine&#x27;</span>, <span class="hljs-string">&#x27;Mobic&#x27;</span>],
 <span class="hljs-string">&#x27;condition&#x27;</span>: [<span class="hljs-string">&#x27;Gout, Acute&#x27;</span>, <span class="hljs-string">&#x27;ibromyalgia&#x27;</span>, <span class="hljs-string">&#x27;Inflammatory Conditions&#x27;</span>],
 <span class="hljs-string">&#x27;review&#x27;</span>: [<span class="hljs-string">&#x27;&quot;like the previous person mention, I&amp;#039;m a strong believer of aleve, it works faster for my gout than the prescription meds I take. No more going to the doctor for refills.....Aleve works!&quot;&#x27;</span>,
  <span class="hljs-string">&#x27;&quot;I have taken Cymbalta for about a year and a half for fibromyalgia pain. It is great\\r\\nas a pain reducer and an anti-depressant, however, the side effects outweighed \\r\\nany benefit I got from it. I had trouble with restlessness, being tired constantly,\\r\\ndizziness, dry mouth, numbness and tingling in my feet, and horrible sweating. I am\\r\\nbeing weaned off of it now. Went from 60 mg to 30mg and now to 15 mg. I will be\\r\\noff completely in about a week. The fibro pain is coming back, but I would rather deal with it than the side effects.&quot;&#x27;</span>,
  <span class="hljs-string">&#x27;&quot;I have been taking Mobic for over a year with no side effects other than an elevated blood pressure.  I had severe knee and ankle pain which completely went away after taking Mobic.  I attempted to stop the medication however pain returned after a few days.&quot;&#x27;</span>],
 <span class="hljs-string">&#x27;rating&#x27;</span>: [<span class="hljs-number">9.0</span>, <span class="hljs-number">3.0</span>, <span class="hljs-number">10.0</span>],
 <span class="hljs-string">&#x27;date&#x27;</span>: [<span class="hljs-string">&#x27;September 2, 2015&#x27;</span>, <span class="hljs-string">&#x27;November 7, 2011&#x27;</span>, <span class="hljs-string">&#x27;June 5, 2013&#x27;</span>],
 <span class="hljs-string">&#x27;usefulCount&#x27;</span>: [<span class="hljs-number">36</span>, <span class="hljs-number">13</span>, <span class="hljs-number">128</span>]}`}}),ie=new w({props:{code:`for split in drug_dataset.keys():
    assert len(drug_dataset[split]) == len(drug_dataset[split].unique("Unnamed: 0"))`,highlighted:`<span class="hljs-keyword">for</span> split <span class="hljs-keyword">in</span> drug_dataset.keys():
    <span class="hljs-keyword">assert</span> <span class="hljs-built_in">len</span>(drug_dataset[split]) == <span class="hljs-built_in">len</span>(drug_dataset[split].unique(<span class="hljs-string">&quot;Unnamed: 0&quot;</span>))`}}),pe=new w({props:{code:`drug_dataset = drug_dataset.rename_column(
    original_column_name="Unnamed: 0", new_column_name="patient_id"
)
drug_dataset`,highlighted:`drug_dataset = drug_dataset.rename_column(
    original_column_name=<span class="hljs-string">&quot;Unnamed: 0&quot;</span>, new_column_name=<span class="hljs-string">&quot;patient_id&quot;</span>
)
drug_dataset`}}),fe=new w({props:{code:`DatasetDict({
    train: Dataset({
        features: ['patient_id', 'drugName', 'condition', 'review', 'rating', 'date', 'usefulCount'],
        num_rows: 161297
    })
    test: Dataset({
        features: ['patient_id', 'drugName', 'condition', 'review', 'rating', 'date', 'usefulCount'],
        num_rows: 53766
    })
})`,highlighted:`DatasetDict({
    train: Dataset({
        features: [<span class="hljs-string">&#x27;patient_id&#x27;</span>, <span class="hljs-string">&#x27;drugName&#x27;</span>, <span class="hljs-string">&#x27;condition&#x27;</span>, <span class="hljs-string">&#x27;review&#x27;</span>, <span class="hljs-string">&#x27;rating&#x27;</span>, <span class="hljs-string">&#x27;date&#x27;</span>, <span class="hljs-string">&#x27;usefulCount&#x27;</span>],
        num_rows: <span class="hljs-number">161297</span>
    })
    test: Dataset({
        features: [<span class="hljs-string">&#x27;patient_id&#x27;</span>, <span class="hljs-string">&#x27;drugName&#x27;</span>, <span class="hljs-string">&#x27;condition&#x27;</span>, <span class="hljs-string">&#x27;review&#x27;</span>, <span class="hljs-string">&#x27;rating&#x27;</span>, <span class="hljs-string">&#x27;date&#x27;</span>, <span class="hljs-string">&#x27;usefulCount&#x27;</span>],
        num_rows: <span class="hljs-number">53766</span>
    })
})`}}),us=new Qs({props:{$$slots:{default:[$4]},$$scope:{ctx:z}}}),de=new w({props:{code:`def lowercase_condition(example):
    return {"condition": example["condition"].lower()}


drug_dataset.map(lowercase_condition)`,highlighted:`<span class="hljs-keyword">def</span> <span class="hljs-title function_">lowercase_condition</span>(<span class="hljs-params">example</span>):
    <span class="hljs-keyword">return</span> {<span class="hljs-string">&quot;condition&quot;</span>: example[<span class="hljs-string">&quot;condition&quot;</span>].lower()}


drug_dataset.<span class="hljs-built_in">map</span>(lowercase_condition)`}}),ue=new w({props:{code:"AttributeError: 'NoneType' object has no attribute 'lower'",highlighted:'AttributeError: <span class="hljs-string">&#x27;NoneType&#x27;</span> <span class="hljs-built_in">object</span> has no attribute <span class="hljs-string">&#x27;lower&#x27;</span>'}}),me=new w({props:{code:`def filter_nones(x):
    return x["condition"] is not None`,highlighted:`<span class="hljs-keyword">def</span> <span class="hljs-title function_">filter_nones</span>(<span class="hljs-params">x</span>):
    <span class="hljs-keyword">return</span> x[<span class="hljs-string">&quot;condition&quot;</span>] <span class="hljs-keyword">is</span> <span class="hljs-keyword">not</span> <span class="hljs-literal">None</span>`}}),_e=new w({props:{code:"lambda <arguments> : <expression>",highlighted:'lambda <span class="hljs-tag">&lt;<span class="hljs-name">arguments</span>&gt;</span> : <span class="hljs-tag">&lt;<span class="hljs-name">expression</span>&gt;</span>'}}),ce=new w({props:{code:"lambda x : x * x",highlighted:'lambda <span class="hljs-keyword">x</span> : <span class="hljs-keyword">x</span> * <span class="hljs-keyword">x</span>'}}),ge=new w({props:{code:"(lambda x: x * x)(3)",highlighted:'(<span class="hljs-keyword">lambda</span> x: x * x)(<span class="hljs-number">3</span>)'}}),$e=new w({props:{code:"9",highlighted:'<span class="hljs-number">9</span>'}}),ve=new w({props:{code:"(lambda base, height: 0.5 * base * height)(4, 8)",highlighted:'(<span class="hljs-keyword">lambda</span> base, height: <span class="hljs-number">0.5</span> * base * height)(<span class="hljs-number">4</span>, <span class="hljs-number">8</span>)'}}),we=new w({props:{code:"16.0",highlighted:'<span class="hljs-number">16.0</span>'}}),Ee=new w({props:{code:'drug_dataset = drug_dataset.filter(lambda x: x["condition"] is not None)',highlighted:'drug_dataset = drug_dataset.<span class="hljs-built_in">filter</span>(<span class="hljs-keyword">lambda</span> x: x[<span class="hljs-string">&quot;condition&quot;</span>] <span class="hljs-keyword">is</span> <span class="hljs-keyword">not</span> <span class="hljs-literal">None</span>)'}}),be=new w({props:{code:`drug_dataset = drug_dataset.map(lowercase_condition)
# Check that lowercasing worked
drug_dataset["train"]["condition"][:3]`,highlighted:`drug_dataset = drug_dataset.<span class="hljs-built_in">map</span>(lowercase_condition)
<span class="hljs-comment"># Check that lowercasing worked</span>
drug_dataset[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-string">&quot;condition&quot;</span>][:<span class="hljs-number">3</span>]`}}),xe=new w({props:{code:"['left ventricular dysfunction', 'adhd', 'birth control']",highlighted:'[<span class="hljs-string">&#x27;left ventricular dysfunction&#x27;</span>, <span class="hljs-string">&#x27;adhd&#x27;</span>, <span class="hljs-string">&#x27;birth control&#x27;</span>]'}}),Te=new F$({}),De=new w({props:{code:`def compute_review_length(example):
    return {"review_length": len(example["review"].split())}`,highlighted:`<span class="hljs-keyword">def</span> <span class="hljs-title function_">compute_review_length</span>(<span class="hljs-params">example</span>):
    <span class="hljs-keyword">return</span> {<span class="hljs-string">&quot;review_length&quot;</span>: <span class="hljs-built_in">len</span>(example[<span class="hljs-string">&quot;review&quot;</span>].split())}`}}),ke=new w({props:{code:`drug_dataset = drug_dataset.map(compute_review_length)
# Inspect the first training example
drug_dataset["train"][0]`,highlighted:`drug_dataset = drug_dataset.<span class="hljs-built_in">map</span>(compute_review_length)
<span class="hljs-comment"># Inspect the first training example</span>
drug_dataset[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-number">0</span>]`}}),ye=new w({props:{code:`{'patient_id': 206461,
 'drugName': 'Valsartan',
 'condition': 'left ventricular dysfunction',
 'review': '"It has no side effect, I take it in combination of Bystolic 5 Mg and Fish Oil"',
 'rating': 9.0,
 'date': 'May 20, 2012',
 'usefulCount': 27,
 'review_length': 17}`,highlighted:`{<span class="hljs-string">&#x27;patient_id&#x27;</span>: <span class="hljs-number">206461</span>,
 <span class="hljs-string">&#x27;drugName&#x27;</span>: <span class="hljs-string">&#x27;Valsartan&#x27;</span>,
 <span class="hljs-string">&#x27;condition&#x27;</span>: <span class="hljs-string">&#x27;left ventricular dysfunction&#x27;</span>,
 <span class="hljs-string">&#x27;review&#x27;</span>: <span class="hljs-string">&#x27;&quot;It has no side effect, I take it in combination of Bystolic 5 Mg and Fish Oil&quot;&#x27;</span>,
 <span class="hljs-string">&#x27;rating&#x27;</span>: <span class="hljs-number">9.0</span>,
 <span class="hljs-string">&#x27;date&#x27;</span>: <span class="hljs-string">&#x27;May 20, 2012&#x27;</span>,
 <span class="hljs-string">&#x27;usefulCount&#x27;</span>: <span class="hljs-number">27</span>,
 <span class="hljs-string">&#x27;review_length&#x27;</span>: <span class="hljs-number">17</span>}`}}),qe=new w({props:{code:'drug_dataset["train"].sort("review_length")[:3]',highlighted:'drug_dataset[<span class="hljs-string">&quot;train&quot;</span>].sort(<span class="hljs-string">&quot;review_length&quot;</span>)[:<span class="hljs-number">3</span>]'}}),Ne=new w({props:{code:`{'patient_id': [103488, 23627, 20558],
 'drugName': ['Loestrin 21 1 / 20', 'Chlorzoxazone', 'Nucynta'],
 'condition': ['birth control', 'muscle spasm', 'pain'],
 'review': ['"Excellent."', '"useless"', '"ok"'],
 'rating': [10.0, 1.0, 6.0],
 'date': ['November 4, 2008', 'March 24, 2017', 'August 20, 2016'],
 'usefulCount': [5, 2, 10],
 'review_length': [1, 1, 1]}`,highlighted:`{<span class="hljs-string">&#x27;patient_id&#x27;</span>: [<span class="hljs-number">103488</span>, <span class="hljs-number">23627</span>, <span class="hljs-number">20558</span>],
 <span class="hljs-string">&#x27;drugName&#x27;</span>: [<span class="hljs-string">&#x27;Loestrin 21 1 / 20&#x27;</span>, <span class="hljs-string">&#x27;Chlorzoxazone&#x27;</span>, <span class="hljs-string">&#x27;Nucynta&#x27;</span>],
 <span class="hljs-string">&#x27;condition&#x27;</span>: [<span class="hljs-string">&#x27;birth control&#x27;</span>, <span class="hljs-string">&#x27;muscle spasm&#x27;</span>, <span class="hljs-string">&#x27;pain&#x27;</span>],
 <span class="hljs-string">&#x27;review&#x27;</span>: [<span class="hljs-string">&#x27;&quot;Excellent.&quot;&#x27;</span>, <span class="hljs-string">&#x27;&quot;useless&quot;&#x27;</span>, <span class="hljs-string">&#x27;&quot;ok&quot;&#x27;</span>],
 <span class="hljs-string">&#x27;rating&#x27;</span>: [<span class="hljs-number">10.0</span>, <span class="hljs-number">1.0</span>, <span class="hljs-number">6.0</span>],
 <span class="hljs-string">&#x27;date&#x27;</span>: [<span class="hljs-string">&#x27;November 4, 2008&#x27;</span>, <span class="hljs-string">&#x27;March 24, 2017&#x27;</span>, <span class="hljs-string">&#x27;August 20, 2016&#x27;</span>],
 <span class="hljs-string">&#x27;usefulCount&#x27;</span>: [<span class="hljs-number">5</span>, <span class="hljs-number">2</span>, <span class="hljs-number">10</span>],
 <span class="hljs-string">&#x27;review_length&#x27;</span>: [<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>]}`}}),hs=new Qs({props:{$$slots:{default:[v4]},$$scope:{ctx:z}}}),Oe=new w({props:{code:`drug_dataset = drug_dataset.filter(lambda x: x["review_length"] > 30)
print(drug_dataset.num_rows)`,highlighted:`drug_dataset = drug_dataset.<span class="hljs-built_in">filter</span>(<span class="hljs-keyword">lambda</span> x: x[<span class="hljs-string">&quot;review_length&quot;</span>] &gt; <span class="hljs-number">30</span>)
<span class="hljs-built_in">print</span>(drug_dataset.num_rows)`}}),Se=new w({props:{code:"{'train': 138514, 'test': 46108}",highlighted:'{<span class="hljs-string">&#x27;train&#x27;</span>: <span class="hljs-number">138514</span>, <span class="hljs-string">&#x27;test&#x27;</span>: <span class="hljs-number">46108</span>}'}}),cs=new Qs({props:{$$slots:{default:[w4]},$$scope:{ctx:z}}}),Re=new w({props:{code:`import html

text = "I&#039;m a transformer called BERT"
html.unescape(text)`,highlighted:`<span class="hljs-keyword">import</span> html

text = <span class="hljs-string">&quot;I&amp;#039;m a transformer called BERT&quot;</span>
html.unescape(text)`}}),Pe=new w({props:{code:`"I'm a transformer called BERT"`,highlighted:'<span class="hljs-string">&quot;I&#x27;m a transformer called BERT&quot;</span>'}}),Ge=new w({props:{code:'drug_dataset = drug_dataset.map(lambda x: {"review": html.unescape(x["review"])})',highlighted:'drug_dataset = drug_dataset.<span class="hljs-built_in">map</span>(<span class="hljs-keyword">lambda</span> x: {<span class="hljs-string">&quot;review&quot;</span>: html.unescape(x[<span class="hljs-string">&quot;review&quot;</span>])})'}}),Ce=new F$({}),ze=new w({props:{code:`new_drug_dataset = drug_dataset.map(
    lambda x: {"review": [html.unescape(o) for o in x["review"]]}, batched=True
)`,highlighted:`new_drug_dataset = drug_dataset.<span class="hljs-built_in">map</span>(
    <span class="hljs-keyword">lambda</span> x: {<span class="hljs-string">&quot;review&quot;</span>: [html.unescape(o) <span class="hljs-keyword">for</span> o <span class="hljs-keyword">in</span> x[<span class="hljs-string">&quot;review&quot;</span>]]}, batched=<span class="hljs-literal">True</span>
)`}}),Ae=new w({props:{code:`from transformers import AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")


def tokenize_function(examples):
    return tokenizer(examples["review"], truncation=True)`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-cased&quot;</span>)


<span class="hljs-keyword">def</span> <span class="hljs-title function_">tokenize_function</span>(<span class="hljs-params">examples</span>):
    <span class="hljs-keyword">return</span> tokenizer(examples[<span class="hljs-string">&quot;review&quot;</span>], truncation=<span class="hljs-literal">True</span>)`}}),Ie=new w({props:{code:"%time tokenized_dataset = drug_dataset.map(tokenize_function, batched=True)",highlighted:'%time tokenized_dataset = drug_dataset.<span class="hljs-built_in">map</span>(tokenize_function, batched=<span class="hljs-literal">True</span>)'}}),Es=new Qs({props:{$$slots:{default:[j4]},$$scope:{ctx:z}}}),Fe=new w({props:{code:`slow_tokenizer = AutoTokenizer.from_pretrained("bert-base-cased", use_fast=False)


def slow_tokenize_function(examples):
    return slow_tokenizer(examples["review"], truncation=True)


tokenized_dataset = drug_dataset.map(slow_tokenize_function, batched=True, num_proc=8)`,highlighted:`slow_tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-cased&quot;</span>, use_fast=<span class="hljs-literal">False</span>)


<span class="hljs-keyword">def</span> <span class="hljs-title function_">slow_tokenize_function</span>(<span class="hljs-params">examples</span>):
    <span class="hljs-keyword">return</span> slow_tokenizer(examples[<span class="hljs-string">&quot;review&quot;</span>], truncation=<span class="hljs-literal">True</span>)


tokenized_dataset = drug_dataset.<span class="hljs-built_in">map</span>(slow_tokenize_function, batched=<span class="hljs-literal">True</span>, num_proc=<span class="hljs-number">8</span>)`}}),ks=new Qs({props:{$$slots:{default:[E4]},$$scope:{ctx:z}}}),ys=new Qs({props:{$$slots:{default:[b4]},$$scope:{ctx:z}}}),Le=new w({props:{code:`def tokenize_and_split(examples):
    return tokenizer(
        examples["review"],
        truncation=True,
        max_length=128,
        return_overflowing_tokens=True,
    )`,highlighted:`<span class="hljs-keyword">def</span> <span class="hljs-title function_">tokenize_and_split</span>(<span class="hljs-params">examples</span>):
    <span class="hljs-keyword">return</span> tokenizer(
        examples[<span class="hljs-string">&quot;review&quot;</span>],
        truncation=<span class="hljs-literal">True</span>,
        max_length=<span class="hljs-number">128</span>,
        return_overflowing_tokens=<span class="hljs-literal">True</span>,
    )`}}),Me=new w({props:{code:`result = tokenize_and_split(drug_dataset["train"][0])
[len(inp) for inp in result["input_ids"]]`,highlighted:`result = tokenize_and_split(drug_dataset[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-number">0</span>])
[<span class="hljs-built_in">len</span>(inp) <span class="hljs-keyword">for</span> inp <span class="hljs-keyword">in</span> result[<span class="hljs-string">&quot;input_ids&quot;</span>]]`}}),Be=new w({props:{code:"[128, 49]",highlighted:'[<span class="hljs-number">128</span>, <span class="hljs-number">49</span>]'}}),Je=new w({props:{code:"tokenized_dataset = drug_dataset.map(tokenize_and_split, batched=True)",highlighted:'tokenized_dataset = drug_dataset.<span class="hljs-built_in">map</span>(tokenize_and_split, batched=<span class="hljs-literal">True</span>)'}}),Ue=new w({props:{code:"ArrowInvalid: Column 1 named condition expected length 1463 but got length 1000",highlighted:'ArrowInvalid: Column <span class="hljs-number">1</span> named condition expected length <span class="hljs-number">1463</span> but got length <span class="hljs-number">1000</span>'}}),Ve=new w({props:{code:`tokenized_dataset = drug_dataset.map(
    tokenize_and_split, batched=True, remove_columns=drug_dataset["train"].column_names
)`,highlighted:`tokenized_dataset = drug_dataset.<span class="hljs-built_in">map</span>(
    tokenize_and_split, batched=<span class="hljs-literal">True</span>, remove_columns=drug_dataset[<span class="hljs-string">&quot;train&quot;</span>].column_names
)`}}),Ye=new w({props:{code:'len(tokenized_dataset["train"]), len(drug_dataset["train"])',highlighted:'<span class="hljs-built_in">len</span>(tokenized_dataset[<span class="hljs-string">&quot;train&quot;</span>]), <span class="hljs-built_in">len</span>(drug_dataset[<span class="hljs-string">&quot;train&quot;</span>])'}}),We=new w({props:{code:"(206772, 138514)",highlighted:'(<span class="hljs-number">206772</span>, <span class="hljs-number">138514</span>)'}}),Xe=new w({props:{code:`def tokenize_and_split(examples):
    result = tokenizer(
        examples["review"],
        truncation=True,
        max_length=128,
        return_overflowing_tokens=True,
    )
    # Extract mapping between new and old indices
    sample_map = result.pop("overflow_to_sample_mapping")
    for key, values in examples.items():
        result[key] = [values[i] for i in sample_map]
    return result`,highlighted:`<span class="hljs-keyword">def</span> <span class="hljs-title function_">tokenize_and_split</span>(<span class="hljs-params">examples</span>):
    result = tokenizer(
        examples[<span class="hljs-string">&quot;review&quot;</span>],
        truncation=<span class="hljs-literal">True</span>,
        max_length=<span class="hljs-number">128</span>,
        return_overflowing_tokens=<span class="hljs-literal">True</span>,
    )
    <span class="hljs-comment"># Extract mapping between new and old indices</span>
    sample_map = result.pop(<span class="hljs-string">&quot;overflow_to_sample_mapping&quot;</span>)
    <span class="hljs-keyword">for</span> key, values <span class="hljs-keyword">in</span> examples.items():
        result[key] = [values[i] <span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> sample_map]
    <span class="hljs-keyword">return</span> result`}}),Ke=new w({props:{code:`tokenized_dataset = drug_dataset.map(tokenize_and_split, batched=True)
tokenized_dataset`,highlighted:`tokenized_dataset = drug_dataset.<span class="hljs-built_in">map</span>(tokenize_and_split, batched=<span class="hljs-literal">True</span>)
tokenized_dataset`}}),Qe=new w({props:{code:`DatasetDict({
    train: Dataset({
        features: ['attention_mask', 'condition', 'date', 'drugName', 'input_ids', 'patient_id', 'rating', 'review', 'review_length', 'token_type_ids', 'usefulCount'],
        num_rows: 206772
    })
    test: Dataset({
        features: ['attention_mask', 'condition', 'date', 'drugName', 'input_ids', 'patient_id', 'rating', 'review', 'review_length', 'token_type_ids', 'usefulCount'],
        num_rows: 68876
    })
})`,highlighted:`DatasetDict({
    train: Dataset({
        features: [<span class="hljs-string">&#x27;attention_mask&#x27;</span>, <span class="hljs-string">&#x27;condition&#x27;</span>, <span class="hljs-string">&#x27;date&#x27;</span>, <span class="hljs-string">&#x27;drugName&#x27;</span>, <span class="hljs-string">&#x27;input_ids&#x27;</span>, <span class="hljs-string">&#x27;patient_id&#x27;</span>, <span class="hljs-string">&#x27;rating&#x27;</span>, <span class="hljs-string">&#x27;review&#x27;</span>, <span class="hljs-string">&#x27;review_length&#x27;</span>, <span class="hljs-string">&#x27;token_type_ids&#x27;</span>, <span class="hljs-string">&#x27;usefulCount&#x27;</span>],
        num_rows: <span class="hljs-number">206772</span>
    })
    test: Dataset({
        features: [<span class="hljs-string">&#x27;attention_mask&#x27;</span>, <span class="hljs-string">&#x27;condition&#x27;</span>, <span class="hljs-string">&#x27;date&#x27;</span>, <span class="hljs-string">&#x27;drugName&#x27;</span>, <span class="hljs-string">&#x27;input_ids&#x27;</span>, <span class="hljs-string">&#x27;patient_id&#x27;</span>, <span class="hljs-string">&#x27;rating&#x27;</span>, <span class="hljs-string">&#x27;review&#x27;</span>, <span class="hljs-string">&#x27;review_length&#x27;</span>, <span class="hljs-string">&#x27;token_type_ids&#x27;</span>, <span class="hljs-string">&#x27;usefulCount&#x27;</span>],
        num_rows: <span class="hljs-number">68876</span>
    })
})`}}),Ze=new F$({}),ta=new H$({props:{id:"tfcY1067A5Q"}}),sa=new w({props:{code:'drug_dataset.set_format("pandas")',highlighted:'drug_dataset.set_format(<span class="hljs-string">&quot;pandas&quot;</span>)'}}),ea=new w({props:{code:'drug_dataset["train"][:3]',highlighted:'drug_dataset[<span class="hljs-string">&quot;train&quot;</span>][:<span class="hljs-number">3</span>]'}}),aa=new w({props:{code:'train_df = drug_dataset["train"][:]',highlighted:'train_df = drug_dataset[<span class="hljs-string">&quot;train&quot;</span>][:]'}}),Cs=new Qs({props:{$$slots:{default:[x4]},$$scope:{ctx:z}}}),na=new w({props:{code:`frequencies = (
    train_df["condition"]
    .value_counts()
    .to_frame()
    .reset_index()
    .rename(columns={"index": "condition", "condition": "frequency"})
)
frequencies.head()`,highlighted:`frequencies = (
    train_df[<span class="hljs-string">&quot;condition&quot;</span>]
    .value_counts()
    .to_frame()
    .reset_index()
    .rename(columns={<span class="hljs-string">&quot;index&quot;</span>: <span class="hljs-string">&quot;condition&quot;</span>, <span class="hljs-string">&quot;condition&quot;</span>: <span class="hljs-string">&quot;frequency&quot;</span>})
)
frequencies.head()`}}),la=new w({props:{code:`from datasets import Dataset

freq_dataset = Dataset.from_pandas(frequencies)
freq_dataset`,highlighted:`<span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> Dataset

freq_dataset = Dataset.from_pandas(frequencies)
freq_dataset`}}),ra=new w({props:{code:`Dataset({
    features: ['condition', 'frequency'],
    num_rows: 819
})`,highlighted:`Dataset({
    features: [<span class="hljs-string">&#x27;condition&#x27;</span>, <span class="hljs-string">&#x27;frequency&#x27;</span>],
    num_rows: <span class="hljs-number">819</span>
})`}}),As=new Qs({props:{$$slots:{default:[T4]},$$scope:{ctx:z}}}),oa=new w({props:{code:"drug_dataset.reset_format()",highlighted:"drug_dataset.reset_format()"}}),pa=new w({props:{code:`drug_dataset_clean = drug_dataset["train"].train_test_split(train_size=0.8, seed=42)
# Rename the default "test" split to "validation"
drug_dataset_clean["validation"] = drug_dataset_clean.pop("test")
# Add the "test" set to our \`DatasetDict\`
drug_dataset_clean["test"] = drug_dataset["test"]
drug_dataset_clean`,highlighted:`drug_dataset_clean = drug_dataset[<span class="hljs-string">&quot;train&quot;</span>].train_test_split(train_size=<span class="hljs-number">0.8</span>, seed=<span class="hljs-number">42</span>)
<span class="hljs-comment"># Rename the default &quot;test&quot; split to &quot;validation&quot;</span>
drug_dataset_clean[<span class="hljs-string">&quot;validation&quot;</span>] = drug_dataset_clean.pop(<span class="hljs-string">&quot;test&quot;</span>)
<span class="hljs-comment"># Add the &quot;test&quot; set to our \`DatasetDict\`</span>
drug_dataset_clean[<span class="hljs-string">&quot;test&quot;</span>] = drug_dataset[<span class="hljs-string">&quot;test&quot;</span>]
drug_dataset_clean`}}),fa=new w({props:{code:`DatasetDict({
    train: Dataset({
        features: ['patient_id', 'drugName', 'condition', 'review', 'rating', 'date', 'usefulCount', 'review_length', 'review_clean'],
        num_rows: 110811
    })
    validation: Dataset({
        features: ['patient_id', 'drugName', 'condition', 'review', 'rating', 'date', 'usefulCount', 'review_length', 'review_clean'],
        num_rows: 27703
    })
    test: Dataset({
        features: ['patient_id', 'drugName', 'condition', 'review', 'rating', 'date', 'usefulCount', 'review_length', 'review_clean'],
        num_rows: 46108
    })
})`,highlighted:`DatasetDict({
    train: Dataset({
        features: [<span class="hljs-string">&#x27;patient_id&#x27;</span>, <span class="hljs-string">&#x27;drugName&#x27;</span>, <span class="hljs-string">&#x27;condition&#x27;</span>, <span class="hljs-string">&#x27;review&#x27;</span>, <span class="hljs-string">&#x27;rating&#x27;</span>, <span class="hljs-string">&#x27;date&#x27;</span>, <span class="hljs-string">&#x27;usefulCount&#x27;</span>, <span class="hljs-string">&#x27;review_length&#x27;</span>, <span class="hljs-string">&#x27;review_clean&#x27;</span>],
        num_rows: <span class="hljs-number">110811</span>
    })
    validation: Dataset({
        features: [<span class="hljs-string">&#x27;patient_id&#x27;</span>, <span class="hljs-string">&#x27;drugName&#x27;</span>, <span class="hljs-string">&#x27;condition&#x27;</span>, <span class="hljs-string">&#x27;review&#x27;</span>, <span class="hljs-string">&#x27;rating&#x27;</span>, <span class="hljs-string">&#x27;date&#x27;</span>, <span class="hljs-string">&#x27;usefulCount&#x27;</span>, <span class="hljs-string">&#x27;review_length&#x27;</span>, <span class="hljs-string">&#x27;review_clean&#x27;</span>],
        num_rows: <span class="hljs-number">27703</span>
    })
    test: Dataset({
        features: [<span class="hljs-string">&#x27;patient_id&#x27;</span>, <span class="hljs-string">&#x27;drugName&#x27;</span>, <span class="hljs-string">&#x27;condition&#x27;</span>, <span class="hljs-string">&#x27;review&#x27;</span>, <span class="hljs-string">&#x27;rating&#x27;</span>, <span class="hljs-string">&#x27;date&#x27;</span>, <span class="hljs-string">&#x27;usefulCount&#x27;</span>, <span class="hljs-string">&#x27;review_length&#x27;</span>, <span class="hljs-string">&#x27;review_clean&#x27;</span>],
        num_rows: <span class="hljs-number">46108</span>
    })
})`}}),ua=new H$({props:{id:"blF9uxYcKHo"}}),ga=new w({props:{code:'drug_dataset_clean.save_to_disk("drug-reviews")',highlighted:'drug_dataset_clean.save_to_disk(<span class="hljs-string">&quot;drug-reviews&quot;</span>)'}}),$a=new w({props:{code:`drug-reviews/
\u251C\u2500\u2500 dataset_dict.json
\u251C\u2500\u2500 test
\u2502   \u251C\u2500\u2500 dataset.arrow
\u2502   \u251C\u2500\u2500 dataset_info.json
\u2502   \u2514\u2500\u2500 state.json
\u251C\u2500\u2500 train
\u2502   \u251C\u2500\u2500 dataset.arrow
\u2502   \u251C\u2500\u2500 dataset_info.json
\u2502   \u251C\u2500\u2500 indices.arrow
\u2502   \u2514\u2500\u2500 state.json
\u2514\u2500\u2500 validation
    \u251C\u2500\u2500 dataset.arrow
    \u251C\u2500\u2500 dataset_info.json
    \u251C\u2500\u2500 indices.arrow
    \u2514\u2500\u2500 state.json`,highlighted:`drug-reviews/
\u251C\u2500\u2500 dataset_dict.json
\u251C\u2500\u2500 test
\u2502   \u251C\u2500\u2500 dataset.arrow
\u2502   \u251C\u2500\u2500 dataset_info.json
\u2502   \u2514\u2500\u2500 <span class="hljs-keyword">state</span>.json
\u251C\u2500\u2500 train
\u2502   \u251C\u2500\u2500 dataset.arrow
\u2502   \u251C\u2500\u2500 dataset_info.json
\u2502   \u251C\u2500\u2500 indices.arrow
\u2502   \u2514\u2500\u2500 <span class="hljs-keyword">state</span>.json
\u2514\u2500\u2500 validation
    \u251C\u2500\u2500 dataset.arrow
    \u251C\u2500\u2500 dataset_info.json
    \u251C\u2500\u2500 indices.arrow
    \u2514\u2500\u2500 <span class="hljs-keyword">state</span>.json`}}),va=new w({props:{code:`from datasets import load_from_disk

drug_dataset_reloaded = load_from_disk("drug-reviews")
drug_dataset_reloaded`,highlighted:`<span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_from_disk

drug_dataset_reloaded = load_from_disk(<span class="hljs-string">&quot;drug-reviews&quot;</span>)
drug_dataset_reloaded`}}),wa=new w({props:{code:`DatasetDict({
    train: Dataset({
        features: ['patient_id', 'drugName', 'condition', 'review', 'rating', 'date', 'usefulCount', 'review_length'],
        num_rows: 110811
    })
    validation: Dataset({
        features: ['patient_id', 'drugName', 'condition', 'review', 'rating', 'date', 'usefulCount', 'review_length'],
        num_rows: 27703
    })
    test: Dataset({
        features: ['patient_id', 'drugName', 'condition', 'review', 'rating', 'date', 'usefulCount', 'review_length'],
        num_rows: 46108
    })
})`,highlighted:`DatasetDict({
    train: Dataset({
        features: [<span class="hljs-string">&#x27;patient_id&#x27;</span>, <span class="hljs-string">&#x27;drugName&#x27;</span>, <span class="hljs-string">&#x27;condition&#x27;</span>, <span class="hljs-string">&#x27;review&#x27;</span>, <span class="hljs-string">&#x27;rating&#x27;</span>, <span class="hljs-string">&#x27;date&#x27;</span>, <span class="hljs-string">&#x27;usefulCount&#x27;</span>, <span class="hljs-string">&#x27;review_length&#x27;</span>],
        num_rows: <span class="hljs-number">110811</span>
    })
    validation: Dataset({
        features: [<span class="hljs-string">&#x27;patient_id&#x27;</span>, <span class="hljs-string">&#x27;drugName&#x27;</span>, <span class="hljs-string">&#x27;condition&#x27;</span>, <span class="hljs-string">&#x27;review&#x27;</span>, <span class="hljs-string">&#x27;rating&#x27;</span>, <span class="hljs-string">&#x27;date&#x27;</span>, <span class="hljs-string">&#x27;usefulCount&#x27;</span>, <span class="hljs-string">&#x27;review_length&#x27;</span>],
        num_rows: <span class="hljs-number">27703</span>
    })
    test: Dataset({
        features: [<span class="hljs-string">&#x27;patient_id&#x27;</span>, <span class="hljs-string">&#x27;drugName&#x27;</span>, <span class="hljs-string">&#x27;condition&#x27;</span>, <span class="hljs-string">&#x27;review&#x27;</span>, <span class="hljs-string">&#x27;rating&#x27;</span>, <span class="hljs-string">&#x27;date&#x27;</span>, <span class="hljs-string">&#x27;usefulCount&#x27;</span>, <span class="hljs-string">&#x27;review_length&#x27;</span>],
        num_rows: <span class="hljs-number">46108</span>
    })
})`}}),ja=new w({props:{code:`for split, dataset in drug_dataset_clean.items():
    dataset.to_json(f"drug-reviews-{split}.jsonl")`,highlighted:`<span class="hljs-keyword">for</span> split, dataset <span class="hljs-keyword">in</span> drug_dataset_clean.items():
    dataset.to_json(<span class="hljs-string">f&quot;drug-reviews-<span class="hljs-subst">{split}</span>.jsonl&quot;</span>)`}}),ba=new w({props:{code:"!head -n 1 drug-reviews-train.jsonl",highlighted:'!head -n <span class="hljs-number">1</span> drug-reviews-train.jsonl'}}),xa=new w({props:{code:`{"patient_id":141780,"drugName":"Escitalopram","condition":"depression","review":"\\"I seemed to experience the regular side effects of LEXAPRO, insomnia, low sex drive, sleepiness during the day. I am taking it at night because my doctor said if it made me tired to take it at night. I assumed it would and started out taking it at night. Strange dreams, some pleasant. I was diagnosed with fibromyalgia. Seems to be helping with the pain. Have had anxiety and depression in my family, and have tried quite a few other medications that haven't worked. Only have been on it for two weeks but feel more positive in my mind, want to accomplish more in my life. Hopefully the side effects will dwindle away, worth it to stick with it from hearing others responses. Great medication.\\"","rating":9.0,"date":"May 29, 2011","usefulCount":10,"review_length":125}`,highlighted:'{<span class="hljs-string">&quot;patient_id&quot;</span>:<span class="hljs-number">141780</span>,<span class="hljs-string">&quot;drugName&quot;</span>:<span class="hljs-string">&quot;Escitalopram&quot;</span>,<span class="hljs-string">&quot;condition&quot;</span>:<span class="hljs-string">&quot;depression&quot;</span>,<span class="hljs-string">&quot;review&quot;</span>:<span class="hljs-string">&quot;\\&quot;I seemed to experience the regular side effects of LEXAPRO, insomnia, low sex drive, sleepiness during the day. I am taking it at night because my doctor said if it made me tired to take it at night. I assumed it would and started out taking it at night. Strange dreams, some pleasant. I was diagnosed with fibromyalgia. Seems to be helping with the pain. Have had anxiety and depression in my family, and have tried quite a few other medications that haven&#x27;t worked. Only have been on it for two weeks but feel more positive in my mind, want to accomplish more in my life. Hopefully the side effects will dwindle away, worth it to stick with it from hearing others responses. Great medication.\\&quot;&quot;</span>,<span class="hljs-string">&quot;rating&quot;</span>:<span class="hljs-number">9.0</span>,<span class="hljs-string">&quot;date&quot;</span>:<span class="hljs-string">&quot;May 29, 2011&quot;</span>,<span class="hljs-string">&quot;usefulCount&quot;</span>:<span class="hljs-number">10</span>,<span class="hljs-string">&quot;review_length&quot;</span>:<span class="hljs-number">125</span>}'}}),Ta=new w({props:{code:`data_files = {
    "train": "drug-reviews-train.jsonl",
    "validation": "drug-reviews-validation.jsonl",
    "test": "drug-reviews-test.jsonl",
}
drug_dataset_reloaded = load_dataset("json", data_files=data_files)`,highlighted:`data_files = {
    <span class="hljs-string">&quot;train&quot;</span>: <span class="hljs-string">&quot;drug-reviews-train.jsonl&quot;</span>,
    <span class="hljs-string">&quot;validation&quot;</span>: <span class="hljs-string">&quot;drug-reviews-validation.jsonl&quot;</span>,
    <span class="hljs-string">&quot;test&quot;</span>: <span class="hljs-string">&quot;drug-reviews-test.jsonl&quot;</span>,
}
drug_dataset_reloaded = load_dataset(<span class="hljs-string">&quot;json&quot;</span>, data_files=data_files)`}}),{c(){u=l("meta"),b=f(),j=l("h1"),E=a("\u662F\u65F6\u5019\u6765\u5B66\u4E00\u4E0B\u5207\u7247\u4E86"),G=f(),m(x.$$.fragment),k=f(),q=l("p"),N=a("\u5927\u591A\u6570\u60C5\u51B5\u4E0B\uFF0C\u60A8\u4F7F\u7528\u7684\u6570\u636E\u90FD\u9700\u6839\u636E\u6A21\u578B\u6240\u8981\u6C42\u7684\u8F93\u5165\u8FDB\u884C\u6E05\u6D17\u3002\u5728\u672C\u8282\u4E2D\uFF0C\u6211\u4EEC\u5C06\u63A2\u7D22 \u{1F917} Datasets \u63D0\u4F9B\u7684\u7528\u4E8E\u6570\u636E\u96C6\u6E05\u6D17\u7684\u5404\u79CD\u529F\u80FD\u3002"),O=f(),m(A.$$.fragment),C=f(),U=l("h2"),ut=a("\u5207\u7247\u4E0E\u5207\u5206\u6211\u4EEC\u7684\u6570\u636E"),M=f(),T=l("p"),$t=a("\u4E0E Pandas \u7C7B\u4F3C\uFF0C\u{1F917} Datasets \u63D0\u4F9B\u4E86\u51E0\u4E2A\u51FD\u6570\u6765\u64CD\u4F5C "),V=l("strong"),vt=a("Dataset"),wt=a(" \u548C "),mt=l("strong"),Zs=a("DatasetDict"),te=a(" \u5BF9\u8C61\u3002\u6211\u4EEC\u5728"),at=l("a"),se=a("\u7B2C\u4E09\u7AE0"),ee=a("\u5DF2\u7ECF\u9047\u5230\u4E86 "),_t=l("strong"),D=a("Dataset.map()"),Na=a(" \u65B9\u6CD5\uFF0C\u5728\u672C\u8282\u4E2D\uFF0C\u6211\u4EEC\u5C06\u63A2\u7D22\u6211\u4EEC\u53EF\u4EE5\u4F7F\u7528\u7684\u5176\u4ED6\u529F\u80FD\u3002"),ae=f(),tt=l("p"),Oa=a("\u5BF9\u4E8E\u8FD9\u4E2A\u4F8B\u5B50\uFF0C\u6211\u4EEC\u5C06\u4F7F\u7528\u6258\u7BA1\u5728"),jt=l("a"),Sa=a("\u52A0\u5DDE\u5927\u5B66\u6B27\u6587\u5206\u6821\u673A\u5668\u5B66\u4E60\u5B58\u50A8\u5E93"),Ra=a("\u7684"),Et=l("a"),iu=a("\u836F\u7269\u5BA1\u67E5\u6570\u636E\u96C6"),pu=a("\uFF0C\u5176\u4E2D\u5305\u542B\u60A3\u8005\u5BF9\u5404\u79CD\u836F\u7269\u7684\u8BC4\u8BBA\uFF0C\u4EE5\u53CA\u6B63\u5728\u6CBB\u7597\u7684\u75C5\u60C5\u548C\u60A3\u8005\u6EE1\u610F\u5EA6\u7684 10 \u661F\u8BC4\u7EA7\u3002"),Ci=f(),bt=l("p"),fu=a("\u9996\u5148\u6211\u4EEC\u9700\u8981\u4E0B\u8F7D\u5E76\u63D0\u53D6\u6570\u636E\uFF0C\u8FD9\u53EF\u4EE5\u901A\u8FC7 "),wl=l("strong"),du=a("wget"),uu=a(" \u548C "),jl=l("strong"),mu=a("unzip"),_u=a(" \u547D\u4EE4\uFF1A"),zi=f(),m(ne.$$.fragment),Ai=f(),xt=l("p"),hu=a("\u7531\u4E8E TSV \u53EA\u662F\u4F7F\u7528\u5236\u8868\u7B26\u800C\u4E0D\u662F\u9017\u53F7\u4F5C\u4E3A\u5206\u9694\u7B26\u7684 CSV \u53D8\u4F53\uFF0C\u6211\u4EEC\u53EF\u4EE5\u4F7F\u7528\u52A0\u8F7D"),El=l("strong"),cu=a("csv"),gu=a("\u6587\u4EF6\u7684"),bl=l("strong"),$u=a("load_dataset()"),vu=a("\u51FD\u6570\u5E76\u6307\u5B9A\u5206\u9694\u7B26 \u793A\u4F8B\u5982\u4E0B\uFF1A"),Ii=f(),m(le.$$.fragment),Hi=f(),Tt=l("p"),wu=a("\u5728\u8FDB\u884C\u4EFB\u4F55\u7C7B\u578B\u7684\u6570\u636E\u5206\u6790\u65F6\uFF0C\u4E00\u4E2A\u597D\u7684\u505A\u6CD5\u662F\u62BD\u53D6\u4E00\u4E2A\u5C0F\u7684\u968F\u673A\u6837\u672C\uFF0C\u4EE5\u5FEB\u901F\u4E86\u89E3\u60A8\u6B63\u5728\u5904\u7406\u7684\u6570\u636E\u7C7B\u578B\u3002\u5728\u{1F917}\u6570\u636E\u96C6\u4E2D\uFF0C\u6211\u4EEC\u53EF\u4EE5\u901A\u8FC7\u94FE\u63A5 "),xl=l("strong"),ju=a("Dataset.shuffle()"),Eu=a(" \u548C "),Tl=l("strong"),bu=a("Dataset.select()"),xu=a(" \u5171\u540C\u6765\u5B8C\u6210\u62BD\u53D6\uFF1A"),Fi=f(),m(re.$$.fragment),Li=f(),m(oe.$$.fragment),Mi=f(),nt=l("p"),Tu=a("\u8BF7\u6CE8\u610F\uFF0C\u51FA\u4E8E\u53EF\u4EE5\u590D\u73B0\u7684\u76EE\u7684\uFF0C\u6211\u4EEC\u5DF2\u5C06\u5728"),Dl=l("strong"),Du=a("Dataset.shuffle()"),ku=a("\u9009\u53D6\u4E86\u56FA\u5B9A\u7684\u968F\u673A\u6570\u79CD\u5B50\u3002 "),kl=l("strong"),yu=a("Dataset.select()"),qu=a(" \u9700\u8981\u4E00\u4E2A\u53EF\u8FED\u4EE3\u7684\u7D22\u5F15\uFF0C\u6240\u4EE5\u6211\u4EEC\u5DF2\u7ECF\u901A\u8FC7\u4E86 "),yl=l("strong"),Nu=a("range(1000)"),Ou=a(" \u4ECE\u968F\u673A\u6253\u4E71\u7684\u6570\u636E\u96C6\u4E2D\u9009\u53D6\u524D 1,000 \u4E2A\u793A\u4F8B\u3002\u4ECE\u62BD\u53D6\u7684\u6570\u636E\u4E2D\uFF0C\u6211\u4EEC\u5DF2\u7ECF\u53EF\u4EE5\u770B\u5230\u6211\u4EEC\u6570\u636E\u96C6\u7684\u4E00\u4E9B\u7279\u70B9\uFF1A"),Bi=f(),Dt=l("ul"),Pa=l("li"),ql=l("strong"),Su=a("Unnamed: 0"),Ru=a("\u8FD9\u5217\u770B\u8D77\u6765\u5F88\u50CF\u6BCF\u4E2A\u60A3\u8005\u7684\u533F\u540D ID\u3002"),Pu=f(),Ga=l("li"),Nl=l("strong"),Gu=a("condition"),Cu=a(" \u8FD9\u5217\u5305\u542B\u6709\u63CF\u8FF0\u5065\u5EB7\u72B6\u51B5\u7684\u6807\u7B7E\u3002"),zu=f(),Vt=l("li"),Au=a("\u8BC4\u8BBA\u957F\u77ED\u4E0D\u4E00\uFF0C\u6DF7\u5408\u6709 Python \u884C\u5206\u9694\u7B26 ("),Ol=l("strong"),Iu=a("\\r\\n"),Hu=a(") \u4EE5\u53CA HTML \u5B57\u7B26\u4EE3\u7801\uFF0C\u5982"),Sl=l("strong"),Fu=a("'"),Lu=a("\u3002"),Ji=f(),kt=l("p"),Mu=a("\u8BA9\u6211\u4EEC\u770B\u770B\u6211\u4EEC\u5982\u4F55\u4F7F\u7528 \u{1F917} Datasets \u6765\u5904\u7406\u8FD9\u4E9B\u95EE\u9898\u3002\u4E3A\u4E86\u9A8C\u8BC1"),Rl=l("strong"),Bu=a("Unnamed: 0"),Ju=a(" \u5217\u5B58\u50A8\u7684\u662F\u60A3\u8005 ID\u7684\u731C\u60F3\uFF0C\u6211\u4EEC\u53EF\u4EE5\u4F7F\u7528 "),Pl=l("strong"),Uu=a("Dataset.unique()"),Vu=a(" \u51FD\u6570\u6765\u9A8C\u8BC1\u533F\u540DID \u7684\u6570\u91CF\u662F\u5426\u4E0E\u62C6\u5206\u540E\u6BCF\u90E8\u5206\u4E2D\u7684\u884C\u6570\u5339\u914D\uFF1A"),Ui=f(),m(ie.$$.fragment),Vi=f(),yt=l("p"),Yu=a("\u8FD9\u4F3C\u4E4E\u8BC1\u5B9E\u4E86\u6211\u4EEC\u7684\u5047\u8BBE\uFF0C\u6240\u4EE5\u8BA9\u6211\u4EEC\u628A "),Gl=l("strong"),Wu=a("Unnamed: 0"),Xu=a(" \u5217\u91CD\u547D\u540D\u4E3A\u60A3\u8005\u7684id\u3002\u6211\u4EEC\u53EF\u4EE5\u4F7F\u7528 "),Cl=l("strong"),Ku=a("DatasetDict.rename_column()"),Qu=a("\u51FD\u6570\u4E00\u6B21\u6027\u91CD\u547D\u540DDatasetDict\u4E2D\u5171\u6709\u7684\u5217\uFF1A"),Yi=f(),m(pe.$$.fragment),Wi=f(),m(fe.$$.fragment),Xi=f(),m(us.$$.fragment),Ki=f(),Y=l("p"),Zu=a("\u63A5\u4E0B\u6765\uFF0C\u8BA9\u6211\u4EEC\u4F7F\u7528 "),zl=l("strong"),tm=a("Dataset.map()"),sm=a("\u6807\u51C6\u5316\u6240\u6709 "),Al=l("strong"),em=a("condition"),am=a(" \u6807\u7B7E .\u6B63\u5982\u6211\u4EEC\u5728"),Ca=l("a"),nm=a("\u7B2C\u4E09\u7AE0"),lm=a("\u4E2D\u6240\u505A\u7684\u90A3\u6837\uFF0C\u6211\u4EEC\u53EF\u4EE5\u5B9A\u4E49\u4E00\u4E2A\u7B80\u5355\u7684\u51FD\u6570\uFF0C\u53EF\u4EE5\u5C06\u8BE5\u51FD\u6570\u5E94\u7528\u4E8E"),Il=l("strong"),rm=a("drug_dataset"),om=a(" \u62C6\u5206\u540E\u6BCF\u90E8\u5206\u7684\u6240\u6709\u884C\uFF1A"),Qi=f(),m(de.$$.fragment),Zi=f(),m(ue.$$.fragment),tp=f(),W=l("p"),im=a("\u54E6\u4E0D\uFF0C\u6211\u4EEC\u7684map\u529F\u80FD\u9047\u5230\u4E86\u95EE\u9898\uFF01\u4ECE\u9519\u8BEF\u4E2D\u6211\u4EEC\u53EF\u4EE5\u63A8\u65AD\u51FA "),Hl=l("strong"),pm=a("condition"),fm=a(" \u5217\u5B58\u5728 "),Fl=l("strong"),dm=a("None"),um=a(" , \u4E0D\u80FD\u8F6C\u6362\u4E3A\u5C0F\u5199\uFF0C\u56E0\u4E3A\u5B83\u4EEC\u4E0D\u662F\u5B57\u7B26\u4E32\u3002\u8BA9\u6211\u4EEC\u4F7F\u7528 "),Ll=l("strong"),mm=a("Dataset.filter()"),_m=a(" \u5220\u9664\u8FD9\u4E9B\u884C \uFF0C\u5176\u5DE5\u4F5C\u65B9\u5F0F\u7C7B\u4F3C\u4E8E "),Ml=l("strong"),hm=a("Dataset.map()"),cm=a(" \u3002\u4F8B\u5982\uFF1A"),sp=f(),m(me.$$.fragment),ep=f(),ms=l("p"),gm=a("\u7136\u540E\u8FD0\u884C "),Bl=l("strong"),$m=a("drug_dataset.filter(filter_nones)"),vm=a(" \uFF0C\u6211\u4EEC\u53EF\u4EE5\u5728\u4E00\u884C\u4E2D\u4F7F\u7528lambda \u51FD\u6570.\u5728 Python \u4E2D\uFF0Clambda \u51FD\u6570\u662F\u60A8\u65E0\u9700\u660E\u786E\u547D\u540D\u5373\u53EF\u4F7F\u7528\u7684\u5FAE\u51FD\u6570\uFF08\u533F\u540D\u51FD\u6570\uFF09\u3002\u5B83\u4EEC\u4E00\u822C\u91C7\u7528\u5982\u4E0B\u5F62\u5F0F\uFF1A"),ap=f(),m(_e.$$.fragment),np=f(),X=l("p"),wm=a("\u5176\u4E2D"),Jl=l("strong"),jm=a("lambda"),Em=a(" \u662F Python \u7684\u7279\u6B8A"),he=l("a"),bm=a("\u5173\u952E\u5B57"),xm=a(", "),Ul=l("strong"),Tm=a("arguments"),Dm=a(" \u662F\u4EE5\u9017\u53F7\u8FDB\u884C\u5206\u9694\u7684\u51FD\u6570\u8F93\u5165\u7684\u5217\u8868/\u96C6\u5408\uFF0C "),Vl=l("strong"),km=a("expression"),ym=a(" \u4EE3\u8868\u60A8\u5E0C\u671B\u6267\u884C\u7684\u64CD\u4F5C\u3002\u4F8B\u5982\uFF0C\u6211\u4EEC\u53EF\u4EE5\u5B9A\u4E49\u4E00\u4E2A\u7B80\u5355\u7684 lambda \u51FD\u6570\u6765\u5BF9\u4E00\u4E2A\u6570\u5B57\u8FDB\u884C\u5E73\u65B9\uFF0C\u5982\u4E0B\u6240\u793A\uFF1A"),lp=f(),m(ce.$$.fragment),rp=f(),za=l("p"),qm=a("\u6211\u4EEC\u9700\u8981\u5C06\u8981\u8F93\u5165\u7ED9\u8FD9\u4E2A\u51FD\u6570\u503C\u62EC\u5728\u62EC\u53F7\u4E2D\uFF1A"),op=f(),m(ge.$$.fragment),ip=f(),m($e.$$.fragment),pp=f(),Aa=l("p"),Nm=a("\u7C7B\u4F3C\u5730\uFF0C\u6211\u4EEC\u53EF\u4EE5\u901A\u8FC7\u7528\u9017\u53F7\u5206\u9694\u591A\u4E2A\u53C2\u6570\u6765\u5B9A\u4E49 lambda \u51FD\u6570\u3002\u4F8B\u5982\uFF0C\u6211\u4EEC\u53EF\u4EE5\u6309\u5982\u4E0B\u65B9\u5F0F\u8BA1\u7B97\u4E09\u89D2\u5F62\u7684\u9762\u79EF\uFF1A"),fp=f(),m(ve.$$.fragment),dp=f(),m(we.$$.fragment),up=f(),qt=l("p"),Om=a("\u5F53\u60A8\u60F3\u5B9A\u4E49\u5C0F\u578B\u3001\u4E00\u6B21\u6027\u4F7F\u7528\u7684\u51FD\u6570\u65F6\uFF0CLambda \u51FD\u6570\u975E\u5E38\u65B9\u4FBF\uFF08\u6709\u5173\u5B83\u4EEC\u7684\u66F4\u591A\u4FE1\u606F\uFF0C\u6211\u4EEC\u5EFA\u8BAE\u9605\u8BFB\u5B89\u5FB7\u70C8\xB7\u5E03\u5C14\u9AD8\u5199\u7684"),je=l("a"),Sm=a("\u771F\u6B63\u7684Python\u6559\u7A0B"),Rm=a("\uFF09\u3002\u5728\u{1F917} Datasets \u4E2D\uFF0C\u6211\u4EEC\u53EF\u4EE5\u4F7F\u7528 lambda \u51FD\u6570\u6765\u5B9A\u4E49\u7B80\u5355\u7684\u6620\u5C04\u548C\u8FC7\u6EE4\u64CD\u4F5C\uFF0C\u6240\u4EE5\u8BA9\u6211\u4EEC\u4F7F\u7528\u8FD9\u4E2A\u6280\u5DE7\u6765\u6D88\u9664\u6211\u4EEC\u6570\u636E\u96C6\u4E2D\u7684 "),Yl=l("strong"),Pm=a("None"),Gm=a(" \u6761\u76EE\uFF1A"),mp=f(),m(Ee.$$.fragment),_p=f(),Nt=l("p"),Cm=a("\u5F53 "),Wl=l("strong"),zm=a("None"),Am=a(" \u6761\u76EE\u5DF2\u5220\u9664\uFF0C\u6211\u4EEC\u53EF\u4EE5\u6807\u51C6\u5316\u6211\u4EEC\u7684 "),Xl=l("strong"),Im=a("condition"),Hm=a(" \u5217\uFF1A"),hp=f(),m(be.$$.fragment),cp=f(),m(xe.$$.fragment),gp=f(),Ia=l("p"),Fm=a("\u6709\u7528\uFF01\u73B0\u5728\u6211\u4EEC\u5DF2\u7ECF\u6E05\u7406\u4E86\u6807\u7B7E\uFF0C\u8BA9\u6211\u4EEC\u6765\u770B\u770B\u6E05\u6D17\u540E\u7684\u8BC4\u8BBA\u6587\u672C\u3002"),$p=f(),Yt=l("h2"),_s=l("a"),Kl=l("span"),m(Te.$$.fragment),Lm=f(),Ql=l("span"),Mm=a("Creating new columns"),vp=f(),Ha=l("p"),Bm=a("\u6BCF\u5F53\u60A8\u5904\u7406\u5BA2\u6237\u8BC4\u8BBA\u65F6\uFF0C\u4E00\u4E2A\u597D\u7684\u505A\u6CD5\u662F\u68C0\u67E5\u6BCF\u4E2A\u8BC4\u8BBA\u4E2D\u7684\u5B57\u6570\u3002\u8BC4\u8BBA\u53EF\u80FD\u53EA\u662F\u4E00\u4E2A\u8BCD\uFF0C\u6BD4\u5982\u201C\u592A\u68D2\u4E86\uFF01\u201D\u6216\u5305\u542B\u6570\u5343\u5B57\u7684\u5B8C\u6574\u6587\u7AE0\uFF0C\u6839\u636E\u5B9E\u9645\u7684\u60C5\u51B5\uFF0C\u60A8\u9700\u8981\u4EE5\u4E0D\u540C\u7684\u65B9\u5F0F\u5904\u7406\u8FD9\u4E9B\u6781\u7AEF\u60C5\u51B5\u3002\u4E3A\u4E86\u8BA1\u7B97\u6BCF\u6761\u8BC4\u8BBA\u4E2D\u7684\u5355\u8BCD\u6570\uFF0C\u6211\u4EEC\u5C06\u4F7F\u7528\u57FA\u4E8E\u7A7A\u683C\u5206\u5272\u6BCF\u4E2A\u6587\u672C\u7684\u7C97\u7565\u65B9\u6CD5\u3002"),wp=f(),Fa=l("p"),Jm=a("\u8BA9\u6211\u4EEC\u5B9A\u4E49\u4E00\u4E2A\u7B80\u5355\u7684\u51FD\u6570\u6765\u8BA1\u7B97\u6BCF\u6761\u8BC4\u8BBA\u4E2D\u7684\u5355\u8BCD\u6570\uFF1A"),jp=f(),m(De.$$.fragment),Ep=f(),B=l("p"),Um=a("\u4E0E\u6211\u4EEC\u7684 "),Zl=l("code"),Vm=a("lowercase_condition()"),Ym=a(" \u51FD\u6570\u4E0D\u540C\uFF0C"),tr=l("code"),Wm=a("compute_review_length()"),Xm=a(" \u8FD4\u56DE\u4E00\u4E2A\u5B57\u5178\uFF0C\u5176\u952E\u4E0E\u6570\u636E\u96C6\u4E2D\u7684\u5217\u540D\u4E4B\u4E00\u4E0D\u5BF9\u5E94\u3002 \u5728\u8FD9\u79CD\u60C5\u51B5\u4E0B\uFF0C\u5F53 "),sr=l("code"),Km=a("compute_review_length()"),Qm=a(" \u4F20\u9012\u7ED9 "),er=l("code"),Zm=a("Dataset.map()"),t_=a(" \u65F6\uFF0C\u5B83\u5C06\u5E94\u7528\u4E8E\u6570\u636E\u96C6\u4E2D\u7684\u6240\u6709\u884C\u4EE5\u521B\u5EFA\u65B0\u7684 "),ar=l("code"),s_=a("review_length"),e_=a(" \u5217\uFF1A"),bp=f(),m(ke.$$.fragment),xp=f(),m(ye.$$.fragment),Tp=f(),Ot=l("p"),a_=a("\u6B63\u5982\u9884\u671F\u7684\u90A3\u6837\uFF0C\u6211\u4EEC\u53EF\u4EE5\u770B\u5230\u4E00\u4E2A "),nr=l("strong"),n_=a("review_length"),l_=a(" \u5217\u5DF2\u6DFB\u52A0\u5230\u6211\u4EEC\u7684\u8BAD\u7EC3\u96C6\u4E2D\u3002\u6211\u4EEC\u53EF\u4EE5\u4F7F\u7528 "),lr=l("strong"),r_=a("Dataset.sort()"),o_=a("\u5BF9\u8FD9\u4E2A\u65B0\u5217\u8FDB\u884C\u6392\u5E8F\uFF0C\u7136\u540E\u67E5\u770B\u6781\u7AEF\u957F\u5EA6\u7684\u8BC4\u8BBA\u7684\u6837\u5B50\uFF1A"),Dp=f(),m(qe.$$.fragment),kp=f(),m(Ne.$$.fragment),yp=f(),La=l("p"),i_=a("\u6B63\u5982\u6211\u4EEC\u6240\u731C\u60F3\u7684\u90A3\u6837\uFF0C\u4E00\u4E9B\u8BC4\u8BBA\u53EA\u5305\u542B\u4E00\u4E2A\u8BCD\uFF0C\u867D\u7136\u8FD9\u5BF9\u4E8E\u60C5\u611F\u5206\u6790\u6765\u8BF4\u53EF\u80FD\u6CA1\u95EE\u9898\uFF0C\u4F46\u5982\u679C\u6211\u4EEC\u60F3\u8981\u9884\u6D4B\u75C5\u60C5\uFF0C\u8FD9\u4E9B\u8BC4\u8BBA\u53EF\u80FD\u5E76\u4E0D\u9002\u5408\u3002"),qp=f(),m(hs.$$.fragment),Np=f(),St=l("p"),p_=a("\u8BA9\u6211\u4EEC\u4F7F\u7528 "),rr=l("strong"),f_=a("Dataset.filter()"),d_=a(" \u529F\u80FD\u6765\u5220\u9664\u5305\u542B\u5C11\u4E8E 30 \u4E2A\u5355\u8BCD\u7684\u8BC4\u8BBA\u3002\u4E0E\u6211\u4EEC\u5BF9 "),or=l("strong"),u_=a("condition"),m_=a(" \u5217\u7684\u5904\u7406\u76F8\u4F3C\uFF0C\u6211\u4EEC\u53EF\u4EE5\u901A\u8FC7\u9009\u53D6\u8BC4\u8BBA\u7684\u957F\u5EA6\u9AD8\u4E8E\u6B64\u9608\u503C\u6765\u8FC7\u6EE4\u6389\u975E\u5E38\u77ED\u7684\u8BC4\u8BBA\uFF1A"),Op=f(),m(Oe.$$.fragment),Sp=f(),m(Se.$$.fragment),Rp=f(),Ma=l("p"),__=a("\u5982\u60A8\u6240\u89C1\uFF0C\u8FD9\u5DF2\u7ECF\u4ECE\u6211\u4EEC\u7684\u539F\u59CB\u8BAD\u7EC3\u548C\u6D4B\u8BD5\u96C6\u4E2D\u5220\u9664\u4E86\u5927\u7EA6 15% \u7684\u8BC4\u8BBA\u3002"),Pp=f(),m(cs.$$.fragment),Gp=f(),gs=l("p"),h_=a("\u6211\u4EEC\u9700\u8981\u5904\u7406\u7684\u6700\u540E\u4E00\u4EF6\u4E8B\u662F\u8BC4\u8BBA\u4E2D\u662F\u5426\u5B58\u5728 HTML \u5B57\u7B26\u4EE3\u7801\u3002\u6211\u4EEC\u53EF\u4EE5\u4F7F\u7528 Python \u7684"),ir=l("strong"),c_=a("html"),g_=a("\u6A21\u5757\u53D6\u6D88\u8FD9\u4E9B\u5B57\u7B26\u7684\u8F6C\u4E49\uFF0C\u5982\u4E0B\u6240\u793A\uFF1A"),Cp=f(),m(Re.$$.fragment),zp=f(),m(Pe.$$.fragment),Ap=f(),$s=l("p"),$_=a("\u6211\u4EEC\u5C06\u4F7F\u7528 "),pr=l("strong"),v_=a("Dataset.map()"),w_=a(" \u5BF9\u6211\u4EEC\u8BED\u6599\u5E93\u4E2D\u7684\u6240\u6709 HTML \u5B57\u7B26\u8FDB\u884C\u8F6C\u4E49\uFF1A"),Ip=f(),m(Ge.$$.fragment),Hp=f(),vs=l("p"),j_=a("\u5982\u60A8\u6240\u89C1\uFF0C "),fr=l("strong"),E_=a("Dataset.map()"),b_=a(" \u65B9\u6CD5\u5BF9\u4E8E\u5904\u7406\u6570\u636E\u975E\u5E38\u6709\u7528\u2014\u2014\u5728\u793A\u4F8B\u4E2D\u4EC5\u4EC5\u662F\u6D45\u5C1D\u8F84\u6B62\u5C31\u6709\u5F88\u5927\u7684\u6536\u83B7\uFF01"),Fp=f(),Wt=l("h2"),ws=l("a"),dr=l("span"),m(Ce.$$.fragment),x_=f(),ur=l("span"),T_=a("map() \u65B9\u6CD5\u7684\u8D85\u7EA7\u52A0\u901F"),Lp=f(),ht=l("p"),mr=l("strong"),D_=a("Dataset.map()"),k_=a(" \u65B9\u6CD5\u6709\u4E00\u4E2A "),_r=l("strong"),y_=a("batched"),q_=a(" \u53C2\u6570\uFF0C\u5982\u679C\u8BBE\u7F6E\u4E3A "),hr=l("strong"),N_=a("True"),O_=a(" , map \u51FD\u6570\u5C06\u4F1A\u5206\u6279\u6267\u884C\u6240\u9700\u8981\u8FDB\u884C\u7684\u64CD\u4F5C\uFF08\u6279\u91CF\u5927\u5C0F\u662F\u53EF\u914D\u7F6E\u7684\uFF0C\u4F46\u9ED8\u8BA4\u4E3A 1,000\uFF09\u3002\u4F8B\u5982\uFF0C\u4E4B\u524D\u5BF9\u6240\u6709 HTML \u8FDB\u884C\u8F6C\u4E49\u7684 map \u51FD\u6570\u8FD0\u884C\u9700\u8981\u4E00\u4E9B\u65F6\u95F4\uFF08\u60A8\u53EF\u4EE5\u4ECE\u8FDB\u5EA6\u6761\u4E2D\u8BFB\u53D6\u6240\u7528\u65F6\u95F4\uFF09\u3002\u6211\u4EEC\u53EF\u4EE5\u901A\u8FC7\u4F7F\u7528\u5217\u8868\u63A8\u5BFC\u540C\u65F6\u5904\u7406\u591A\u4E2A\u5143\u7D20\u6765\u52A0\u5FEB\u901F\u5EA6\u3002"),Mp=f(),K=l("p"),S_=a("\u5F53\u60A8\u5728\u4F7F\u7528 "),cr=l("strong"),R_=a("Dataset.map()"),P_=a("\u51FD\u6570\u65F6\u6307\u5B9A "),gr=l("strong"),G_=a("batched=True"),C_=a("\u3002\u8BE5\u51FD\u6570\u4F1A\u63A5\u6536\u4E00\u4E2A\u5305\u542B\u6570\u636E\u96C6\u5B57\u6BB5\u7684\u5B57\u5178\uFF0C\u6BCF\u4E2A\u503C\u90FD\u662F\u4E00\u4E2A\u5217\u8868\uFF0C\u800C\u4E0D\u4EC5\u4EC5\u662F\u5355\u4E2A\u503C\u3002"),$r=l("strong"),z_=a("Dataset.map()"),A_=a(" \u7684\u8FD4\u56DE\u503C\u5E94\u8BE5\u662F\u76F8\u540C\u7684\uFF1A\u4E00\u4E2A\u5305\u542B\u6211\u4EEC\u60F3\u8981\u66F4\u65B0\u6216\u6DFB\u52A0\u5230\u6570\u636E\u96C6\u4E2D\u7684\u5B57\u6BB5\u7684\u5B57\u5178\uFF0C\u5B57\u5178\u7684\u952E\u662F\u8981\u6DFB\u52A0\u7684\u5B57\u6BB5\uFF0C\u5B57\u5178\u7684\u503C\u662F\u7ED3\u679C\u7684\u5217\u8868\u3002\u4F8B\u5982\uFF0C\u8FD9\u662F\u4F7F\u7528 "),vr=l("strong"),I_=a("batched=True"),H_=a("\u5BF9\u6240\u6709 HTML \u5B57\u7B26\u8FDB\u884C\u8F6C\u4E49\u7684\u65B9\u6CD5 \uFF1A"),Bp=f(),m(ze.$$.fragment),Jp=f(),Rt=l("p"),F_=a("\u5982\u679C\u60A8\u5728\u7B14\u8BB0\u672C\u4E2D\u8FD0\u884C\u6B64\u4EE3\u7801\uFF0C\u60A8\u4F1A\u770B\u5230\u6B64\u547D\u4EE4\u7684\u6267\u884C\u901F\u5EA6\u6BD4\u524D\u4E00\u4E2A\u547D\u4EE4\u5FEB\u5F97\u591A\u3002\u8FD9\u4E0D\u662F\u56E0\u4E3A\u6211\u4EEC\u7684\u8BC4\u8BBA\u5DF2\u7ECF\u662F\u5904\u7406\u8FC7\u7684\u2014\u2014\u5982\u679C\u4F60\u91CD\u65B0\u6267\u884C\u4E0A\u4E00\u8282\u7684\u6307\u4EE4\uFF08\u6CA1\u6709 "),wr=l("strong"),L_=a("batched=True"),M_=a(" )\uFF0C\u5B83\u5C06\u82B1\u8D39\u4E0E\u4EE5\u524D\u76F8\u540C\u7684\u65F6\u95F4\u3002\u8FD9\u662F\u56E0\u4E3A\u5217\u8868\u63A8\u5BFC\u5F0F\u901A\u5E38\u6BD4\u5728\u540C\u4E00\u4EE3\u7801\u4E2D\u7528 "),jr=l("strong"),B_=a("for"),J_=a(" \u5FAA\u73AF\u6267\u884C\u76F8\u540C\u7684\u4EE3\u7801\u66F4\u5FEB\uFF0C\u5E76\u4E14\u6211\u4EEC\u8FD8\u901A\u8FC7\u540C\u65F6\u8BBF\u95EE\u591A\u4E2A\u5143\u7D20\u800C\u4E0D\u662F\u4E00\u4E2A\u4E00\u4E2A\u6765\u5904\u7406\u6765\u63D0\u9AD8\u5904\u7406\u7684\u901F\u5EA6\u3002"),Up=f(),lt=l("p"),U_=a("\u5728"),Ba=l("a"),V_=a("\u7B2C\u516D\u7AE0"),Y_=a("\u6211\u4EEC\u5C06\u9047\u5230\u7684\u201C\u5FEB\u901F\u201D\u6807\u8BB0\u5668\uFF0C\u5B83\u53EF\u4EE5\u5FEB\u901F\u6807\u8BB0\u5927\u6587\u672C\u5217\u8868\u3002\u4F7F\u7528 "),Er=l("strong"),W_=a("Dataset.map()"),X_=a(" \u548C "),br=l("strong"),K_=a("batched=True"),Q_=a(" \u662F\u52A0\u901F\u7684\u5173\u952E\u3002\u4F8B\u5982\uFF0C\u8981\u4F7F\u7528\u5FEB\u901F\u6807\u8BB0\u5668\u6807\u8BB0\u6240\u6709\u836F\u7269\u8BC4\u8BBA\uFF0C\u6211\u4EEC\u53EF\u4EE5\u4F7F\u7528\u8FD9\u6837\u7684\u51FD\u6570\uFF1A"),Vp=f(),m(Ae.$$.fragment),Yp=f(),rt=l("p"),Z_=a("\u6B63\u5982\u4F60\u5728"),Ja=l("a"),th=a("\u7B2C\u4E09\u7AE0"),sh=a("\u6240\u770B\u5230\u7684\uFF0C\u6211\u4EEC\u539F\u672C\u5C31\u53EF\u4EE5\u5C06\u4E00\u4E2A\u6216\u591A\u4E2A\u793A\u4F8B\u4F20\u9012\u7ED9\u5206\u8BCD\u5668\uFF0C\u56E0\u6B64\u5728"),xr=l("strong"),eh=a("batched=True"),ah=a("\u662F\u4E00\u4E2A\u975E\u5FC5\u987B\u7684\u9009\u9879.\u8BA9\u6211\u4EEC\u501F\u6B64\u673A\u4F1A\u6BD4\u8F83\u4E0D\u540C\u9009\u9879\u7684\u6027\u80FD\u3002\u5728\u7B14\u8BB0\u672C\u4E2D\uFF0C\u60A8\u53EF\u4EE5\u5728\u60A8\u8981\u6D4B\u91CF\u7684\u4EE3\u7801\u884C\u4E4B\u524D\u6DFB\u52A0 "),Tr=l("strong"),nh=a("%time"),lh=a("\u6765\u6D4B\u8BD5\u6539\u884C\u8FD0\u884C\u6240\u6D88\u8017\u7684\u65F6\u95F4\uFF1A"),Wp=f(),m(Ie.$$.fragment),Xp=f(),js=l("p"),rh=a("\u60A8\u8FD8\u53EF\u4EE5\u901A\u8FC7\u5C06\u6574\u4E2A\u5355\u5143\u683C\u8BA1\u65F6 "),Dr=l("strong"),oh=a("%%time"),ih=a(" \u5728\u5355\u5143\u683C\u7684\u5F00\u5934\u3002\u5728\u6211\u4EEC\u6267\u884C\u6B64\u64CD\u4F5C\u7684\u786C\u4EF6\u4E0A\uFF0C\u8BE5\u6307\u4EE4\u663E\u793A 10.8 \u79D2\uFF08\u8FD9\u662F\u5199\u5728\u201CWall time\u201D\u4E4B\u540E\u7684\u6570\u5B57\uFF09\u3002"),Kp=f(),m(Es.$$.fragment),Qp=f(),Ua=l("p"),ph=a("\u4EE5\u4E0B\u662F\u6211\u4EEC\u5728\u4F7F\u7528\u548C\u4E0D\u4F7F\u7528\u6279\u5904\u7406\u65F6\u4F7F\u7528\u5FEB\u901F\u548C\u6162\u901F\u5206\u8BCD\u5668\u83B7\u5F97\u7684\u7ED3\u679C\uFF1A"),Zp=f(),bs=l("table"),kr=l("thead"),Xt=l("tr"),Va=l("th"),fh=a("Options"),dh=f(),Ya=l("th"),uh=a("Fast tokenizer"),mh=f(),Wa=l("th"),_h=a("Slow tokenizer"),hh=f(),He=l("tbody"),Kt=l("tr"),Xa=l("td"),yr=l("code"),ch=a("batched=True"),gh=f(),Ka=l("td"),$h=a("10.8s"),vh=f(),Qa=l("td"),wh=a("4min41s"),jh=f(),Qt=l("tr"),Za=l("td"),qr=l("code"),Eh=a("batched=False"),bh=f(),tn=l("td"),xh=a("59.2s"),Th=f(),sn=l("td"),Dh=a("5min3s"),tf=f(),ot=l("p"),kh=a("\u8FD9\u610F\u5473\u7740\u4F7F\u7528\u5E26\u6709 "),Nr=l("strong"),yh=a("batched=True"),qh=a(" \u9009\u9879\u6BD4\u6CA1\u6709\u6279\u5904\u7406\u7684\u6162\u9009\u9879\u5FEB 30 \u500D\u2014\u2014\u8FD9\u771F\u662F\u592A\u68D2\u4E86\uFF01\u8FD9\u5C31\u662F\u4E3A\u4EC0\u4E48"),Or=l("strong"),Nh=a("AutoTokenizer"),Oh=a(" \u7684\u9ED8\u8BA4\u8BBE\u7F6E\u662F"),Sr=l("strong"),Sh=a("use_fast=True"),Rh=a("\u7684\u4E3B\u8981\u539F\u56E0 \uFF08\u4EE5\u53CA\u4E3A\u4EC0\u4E48\u5B83\u4EEC\u88AB\u79F0\u4E3A\u201C\u5FEB\u901F\u201D\uFF09\u3002\u4ED6\u4EEC\u80FD\u591F\u5B9E\u73B0\u8FD9\u6837\u7684\u52A0\u901F\uFF0C\u56E0\u4E3A\u5728\u5E95\u5C42\u7684\u6807\u8BB0\u5316\u4EE3\u7801\u662F\u5728 Rust \u4E2D\u6267\u884C\u7684\uFF0CRust \u662F\u4E00\u79CD\u53EF\u4EE5\u8F7B\u677E\u5E76\u884C\u5316\u6267\u884C\u7684\u8BED\u8A00\u3002"),sf=f(),en=l("p"),Ph=a("\u5E76\u884C\u5316\u4E5F\u662F\u5FEB\u901F\u6807\u8BB0\u5668\u901A\u8FC7\u6279\u5904\u7406\u5B9E\u73B0\u8FD1 6 \u500D\u52A0\u901F\u7684\u539F\u56E0\uFF1A\u5355\u4E2A\u6807\u8BB0\u5316\u64CD\u4F5C\u662F\u4E0D\u80FD\u5E76\u884C\u7684\uFF0C\u4F46\u662F\u5F53\u60A8\u60F3\u540C\u65F6\u6807\u8BB0\u5927\u91CF\u6587\u672C\u65F6\uFF0C\u60A8\u53EF\u4EE5\u5C06\u6267\u884C\u62C6\u5206\u4E3A\u591A\u4E2A\u8FDB\u7A0B\uFF0C\u6BCF\u4E2A\u8FDB\u7A0B\u90FD\u5BF9\u81EA\u5DF1\u7684\u6587\u672C\u8D1F\u8D23\u3002"),ef=f(),ct=l("p"),Rr=l("strong"),Gh=a("Dataset.map()"),Ch=a(" \u4E5F\u6709\u4E00\u4E9B\u81EA\u5DF1\u7684\u5E76\u884C\u5316\u80FD\u529B\u3002\u7531\u4E8E\u5B83\u4EEC\u4E0D\u53D7 Rust \u7684\u652F\u6301\uFF0C\u56E0\u6B64\u6162\u901F\u5206\u8BCD\u5668\u7684\u901F\u5EA6\u8D76\u4E0D\u4E0A\u5FEB\u901F\u5206\u8BCD\u5668\uFF0C\u4F46\u5B83\u4EEC\u4ECD\u7136\u4F1A\u66F4\u5FEB\u4E00\u4E9B\uFF08\u5C24\u5176\u662F\u5F53\u60A8\u4F7F\u7528\u6CA1\u6709\u5FEB\u901F\u7248\u672C\u7684\u5206\u8BCD\u5668\u65F6\uFF09\u3002\u8981\u542F\u7528\u591A\u5904\u7406\uFF0C\u8BF7\u5728"),Pr=l("strong"),zh=a("Dataset.map()"),Ah=a("\u65F6\u4F7F\u7528 "),Gr=l("strong"),Ih=a("num_proc"),Hh=a(" \u53C2\u6570\u5E76\u6307\u5B9A\u8981\u5728\u8C03\u7528\u4E2D\u4F7F\u7528\u7684\u8FDB\u7A0B\u6570 \uFF1A"),af=f(),m(Fe.$$.fragment),nf=f(),an=l("p"),Fh=a("\u60A8\u53EF\u4EE5\u5BF9\u5904\u7406\u7684\u65F6\u95F4\u8FDB\u884C\u4E00\u4E9B\u8BD5\u9A8C\uFF0C\u4EE5\u786E\u5B9A\u8981\u4F7F\u7528\u7684\u6700\u4F73\u8FDB\u7A0B\u6570\uFF1B\u5728\u6211\u4EEC\u7684\u4F8B\u5B50\u4E2D\uFF0C8 \u4F3C\u4E4E\u4EA7\u751F\u4E86\u6700\u597D\u7684\u901F\u5EA6\u589E\u76CA\u3002\u4EE5\u4E0B\u662F\u6211\u4EEC\u5728\u4F7F\u7528\u548C\u4E0D\u4F7F\u7528\u591A\u5904\u7406\u65F6\u6240\u9700\u8981\u7684\u65F6\u95F4\uFF1A"),lf=f(),xs=l("table"),Cr=l("thead"),Zt=l("tr"),nn=l("th"),Lh=a("Options"),Mh=f(),ln=l("th"),Bh=a("Fast tokenizer"),Jh=f(),rn=l("th"),Uh=a("Slow tokenizer"),Vh=f(),gt=l("tbody"),ts=l("tr"),on=l("td"),zr=l("code"),Yh=a("batched=True"),Wh=f(),pn=l("td"),Xh=a("10.8s"),Kh=f(),fn=l("td"),Qh=a("4min41s"),Zh=f(),ss=l("tr"),dn=l("td"),Ar=l("code"),tc=a("batched=False"),sc=f(),un=l("td"),ec=a("59.2s"),ac=f(),mn=l("td"),nc=a("5min3s"),lc=f(),es=l("tr"),Ts=l("td"),Ir=l("code"),rc=a("batched=True"),oc=a(", "),Hr=l("code"),ic=a("num_proc=8"),pc=f(),_n=l("td"),fc=a("6.52s"),dc=f(),hn=l("td"),uc=a("41.3s"),mc=f(),as=l("tr"),Ds=l("td"),Fr=l("code"),_c=a("batched=False"),hc=a(", "),Lr=l("code"),cc=a("num_proc=8"),gc=f(),cn=l("td"),$c=a("9.49s"),vc=f(),gn=l("td"),wc=a("45.2s"),rf=f(),Q=l("p"),jc=a("\u5BF9\u4E8E\u6162\u901F\u5206\u8BCD\u5668\u6765\u8BF4\uFF0C\u8FD9\u4E9B\u7ED3\u679C\u8981\u5408\u7406\u5F97\u591A\uFF0C\u4F46\u5FEB\u901F\u5206\u8BCD\u5668\u7684\u6027\u80FD\u4E5F\u5F97\u5230\u4E86\u663E\u7740\u63D0\u9AD8\u3002\u4F46\u662F\u8BF7\u6CE8\u610F\uFF0C\u60C5\u51B5\u5E76\u975E\u603B\u662F\u5982\u6B64\u2014\u2014\u9664\u4E86 "),Mr=l("strong"),Ec=a("num_proc=8"),bc=a("\uFF0C\u6211\u4EEC\u7684\u6D4B\u8BD5\u8868\u660E\uFF0C\u4F7F\u7528"),Br=l("strong"),xc=a("batched=True"),Tc=a("\u800C\u4E0D\u5E26\u6709"),Jr=l("strong"),Dc=a("num_proc"),kc=a("\u53C2\u6570\u7684\u9009\u9879\u5904\u7406\u8D77\u6765\u66F4\u5FEB\u3002\u901A\u5E38\uFF0C\u6211\u4EEC\u4E0D\u5EFA\u8BAE\u5C06 Python \u591A\u7EBF\u7A0B\u5904\u7406\u7528\u4E8E\u5177\u6709"),Ur=l("strong"),yc=a("batched=True"),qc=a("\u529F\u80FD\u7684\u5FEB\u901F\u6807\u8BB0\u5668  ."),of=f(),m(ks.$$.fragment),pf=f(),it=l("p"),Nc=a("\u5C06\u6240\u6709\u8FD9\u4E9B\u529F\u80FD\u6D53\u7F29\u5230\u4E00\u4E2A\u65B9\u6CD5\u4E2D\u5DF2\u7ECF\u975E\u5E38\u4E86\u4E0D\u8D77\uFF0C\u4F46\u8FD8\u6709\u66F4\u591A\uFF01\u4F7F\u7528 "),Vr=l("strong"),Oc=a("Dataset.map()"),Sc=a(" \u548C "),Yr=l("strong"),Rc=a("batched=True"),Pc=a(" \u60A8\u53EF\u4EE5\u66F4\u6539\u6570\u636E\u96C6\u4E2D\u7684\u5143\u7D20\u6570\u91CF\u3002\u5F53\u4F60\u60F3\u4ECE\u4E00\u4E2A\u4F8B\u5B50\u4E2D\u521B\u5EFA\u51E0\u4E2A\u8BAD\u7EC3\u7279\u5F81\u65F6\uFF0C\u8FD9\u662F\u975E\u5E38\u6709\u7528\u7684\u3002\u6211\u4EEC\u5C06\u5728"),$n=l("a"),Gc=a("\u7B2C\u4E03\u7AE0"),Cc=a(".\u4E2D\u8FDB\u884C\u7684\u51E0\u4E2ANLP\u4EFB\u52A1\u7684\u9884\u5904\u7406\u4E2D\u4F7F\u7528\u5230\u8FD9\u4E2A\u529F\u80FD\uFF0C\u5B83\u975E\u5E38\u4FBF\u5229\u3002"),ff=f(),m(ys.$$.fragment),df=f(),qs=l("p"),zc=a("\u8BA9\u6211\u4EEC\u6765\u770B\u770B\u5B83\u662F\u5982\u4F55\u5DE5\u4F5C\u7684\uFF01\u5728\u8FD9\u91CC\uFF0C\u6211\u4EEC\u5C06\u6807\u8BB0\u5316\u6211\u4EEC\u7684\u793A\u4F8B\u5E76\u5C06\u6700\u5927\u622A\u65AD\u957F\u5EA6\u8BBE\u7F6E128\uFF0C\u4F46\u6211\u4EEC\u5C06\u8981\u6C42\u6807\u8BB0\u5668\u8FD4\u56DE\u5168\u90E8\u6587\u672C\u5757\uFF0C\u800C\u4E0D\u4EC5\u4EC5\u662F\u7B2C\u4E00\u4E2A\u3002\u8FD9\u53EF\u4EE5\u7528 "),Wr=l("strong"),Ac=a("return_overflowing_tokens=True"),Ic=a(" \uFF1A"),uf=f(),m(Le.$$.fragment),mf=f(),Ns=l("p"),Hc=a("\u5728\u4F7F\u7528"),Xr=l("strong"),Fc=a("Dataset.map()"),Lc=a(" \u6B63\u5F0F\u5728\u6574\u4E2A\u6570\u636E\u96C6\u4E0A\u5F00\u59CB\u5904\u7406\u4E4B\u524D\u8BA9\u6211\u4EEC\u5148\u5728\u4E00\u4E2A\u4F8B\u5B50\u4E0A\u6D4B\u8BD5\u4E00\u4E0B\uFF1A"),_f=f(),m(Me.$$.fragment),hf=f(),m(Be.$$.fragment),cf=f(),vn=l("p"),Mc=a("\u77A7\uFF01\u6211\u4EEC\u5728\u8BAD\u7EC3\u96C6\u4E2D\u7684\u7B2C\u4E00\u4E2A\u793A\u4F8B\u53D8\u6210\u4E86\u4E24\u4E2A\u7279\u5F81\uFF0C\u56E0\u4E3A\u5B83\u88AB\u6807\u8BB0\u4E3A\u8D85\u8FC7\u6211\u4EEC\u6307\u5B9A\u7684\u6700\u5927\u622A\u65AD\u957F\u5EA6\uFF0C\u56E0\u6B64\u7ED3\u679C\u88AB\u622A\u6210\u4E86\u4E24\u6BB5\uFF1A\u7B2C\u4E00\u6BB5\u957F\u5EA6\u4E3A 128 \uFF0C\u7B2C\u4E8C\u6BB5\u957F\u5EA6\u4E3A 49 \u3002\u73B0\u5728\u8BA9\u6211\u4EEC\u5BF9\u6240\u6709\u5143\u7D20\u6267\u884C\u6B64\u64CD\u4F5C\u6570\u636E\u96C6\uFF01"),gf=f(),m(Je.$$.fragment),$f=f(),m(Ue.$$.fragment),vf=f(),wn=l("p"),Bc=a("\u4E0D\u597D\u4E86\uFF01\u5B83\u6CA1\u6709\u8D77\u4F5C\u7528\uFF01\u4E3A\u4EC0\u4E48\u5462\uFF1F\u67E5\u770B\u9519\u8BEF\u6D88\u606F\u4F1A\u7ED9\u6211\u4EEC\u4E00\u4E2A\u7EBF\u7D22\uFF1A\u5217\u7684\u957F\u5EA6\u4E0D\u5339\u914D\uFF0C\u4E00\u5217\u957F\u5EA6\u4E3A 1,463\uFF0C\u53E6\u4E00\u5217\u957F\u5EA6\u4E3A 1,000\u30021,000\u884C\u7684\u201Dreview\u201D\u7ED9\u51FA\u4E86 1,463 \u884C\u7684\u65B0\u7279\u5F81\uFF0C\u5BFC\u81F4\u548C\u539F\u672C\u76841000\u884C\u6570\u636E\u4E0D\u5339\u914D\u3002"),wf=f(),Z=l("p"),Jc=a("\u95EE\u9898\u51FA\u5728\u6211\u4EEC\u8BD5\u56FE\u6DF7\u5408\u4E24\u4E2A\u4E0D\u540C\u5927\u5C0F\u7684\u4E0D\u540C\u6570\u636E\u96C6\uFF1A "),Kr=l("strong"),Uc=a("drug_dataset"),Vc=a(" \u5217\u5C06\u6709\u4E00\u5B9A\u6570\u91CF\u7684\u5143\u7D20\uFF08\u6211\u4EEC\u9519\u8BEF\u4E2D\u7684 1,000\uFF09\uFF0C\u4F46\u662F\u6211\u4EEC\u6B63\u5728\u6784\u5EFA"),Qr=l("strong"),Yc=a("tokenized_dataset"),Wc=a(" \u5C06\u6709\u66F4\u591A\u7684\u5143\u7D20\uFF08\u9519\u8BEF\u6D88\u606F\u4E2D\u7684 1,463\uFF09\u3002\u8FD9\u4E0D\u9002\u7528\u4E8E "),Zr=l("strong"),Xc=a("Dataset"),Kc=a(" \uFF0C\u56E0\u6B64\u6211\u4EEC\u9700\u8981\u4ECE\u65E7\u6570\u636E\u96C6\u4E2D\u5220\u9664\u5217\u6216\u4F7F\u5B83\u4EEC\u7684\u5927\u5C0F\u4E0E\u65B0\u6570\u636E\u96C6\u4E2D\u7684\u5927\u5C0F\u76F8\u540C\u3002\u6211\u4EEC\u53EF\u4EE5\u7528 "),to=l("strong"),Qc=a("remove_columns"),Zc=a(" \u53C2\u6570\uFF1A"),jf=f(),m(Ve.$$.fragment),Ef=f(),jn=l("p"),t2=a("\u73B0\u5728\u8FD9\u4E2A\u8FC7\u7A0B\u6CA1\u6709\u9519\u8BEF\u3002\u6211\u4EEC\u53EF\u4EE5\u901A\u8FC7\u6BD4\u8F83\u957F\u5EA6\u6765\u68C0\u67E5\u65B0\u6570\u636E\u96C6\u7684\u5143\u7D20\u662F\u5426\u6BD4\u539F\u59CB\u6570\u636E\u96C6\u591A\u5F97\u591A\uFF1A"),bf=f(),m(Ye.$$.fragment),xf=f(),m(We.$$.fragment),Tf=f(),Pt=l("p"),s2=a("\u6211\u4EEC\u63D0\u5230\u6211\u4EEC\u8FD8\u53EF\u4EE5\u901A\u8FC7\u4F7F\u65E7\u5217\u4E0E\u65B0\u5217\u7684\u5927\u5C0F\u76F8\u540C\u6765\u5904\u7406\u957F\u5EA6\u4E0D\u5339\u914D\u7684\u95EE\u9898\u3002\u4E3A\u6B64\uFF0C\u6211\u4EEC\u53EF\u4EE5\u4F7F\u7528 "),so=l("strong"),e2=a("overflow_to_sample_mapping"),a2=a(" \u5B57\u6BB5\uFF0C\u5F53\u6211\u4EEC\u8BBE\u7F6E"),eo=l("strong"),n2=a("return_overflowing_tokens=True"),l2=a(" .\u5B83\u4E3A\u6211\u4EEC\u63D0\u4F9B\u4E86\u7279\u5F81\u5230\u5B83\u6240\u4EA7\u751F\u7684\u6837\u672C\u7684\u6620\u5C04\u3002\u4F7F\u7528\u8FD9\u4E2A\uFF0C\u6211\u4EEC\u53EF\u4EE5\u5C06\u539F\u59CB\u6570\u636E\u96C6\u4E2D\u7684\u6BCF\u4E2A\u952E\u5173\u8054\u5230\u4E00\u4E2A\u5408\u9002\u5927\u5C0F\u7684\u503C\u5217\u8868\u4E2D\uFF0C\u901A\u8FC7\u904D\u5386\u6240\u6709\u7684\u6570\u636E\u6765\u751F\u6210\u65B0\u7279\u6027:"),Df=f(),m(Xe.$$.fragment),kf=f(),Os=l("p"),r2=a("\u6211\u4EEC\u53EF\u4EE5\u4F7F\u7528"),ao=l("strong"),o2=a("Dataset.map()"),i2=a("\u6765\u8FDB\u884C\u6279\u5904\u7406\uFF0C\u8FD9\u6837\u65E0\u9700\u6211\u4EEC\u5220\u9664\u65E7\u5217\uFF1A"),yf=f(),m(Ke.$$.fragment),qf=f(),m(Qe.$$.fragment),Nf=f(),En=l("p"),p2=a("\u6211\u4EEC\u83B7\u5F97\u4E86\u4E0E\u4EE5\u524D\u76F8\u540C\u6570\u91CF\u7684\u8BAD\u7EC3\u7279\u5F81\uFF0C\u4F46\u5728\u8FD9\u91CC\u6211\u4EEC\u4FDD\u7559\u4E86\u6240\u6709\u65E7\u5B57\u6BB5\u3002\u5982\u679C\u60A8\u5728\u4F7F\u7528\u6A21\u578B\u8BA1\u7B97\u4E4B\u540E\u9700\u8981\u5B83\u4EEC\u8FDB\u884C\u4E00\u4E9B\u540E\u5904\u7406\uFF0C\u60A8\u53EF\u80FD\u9700\u8981\u4F7F\u7528\u8FD9\u79CD\u65B9\u6CD5\u3002"),Of=f(),Ss=l("p"),f2=a("\u60A8\u73B0\u5728\u5DF2\u7ECF\u4E86\u89E3\u4E86 \u{1F917} Datasets\u5982\u4F55\u4EE5\u5404\u79CD\u65B9\u5F0F\u7528\u4E8E\u9884\u5904\u7406\u6570\u636E\u96C6\u3002\u867D\u7136\u{1F917} Datasets \u7684\u5904\u7406\u529F\u80FD\u4F1A\u8986\u76D6\u4F60\u5927\u90E8\u5206\u7684\u6A21\u578B\u8BAD\u7EC3\u9700\u6C42\uFF0C\u6709\u65F6\u60A8\u53EF\u80FD\u9700\u8981\u5207\u6362\u5230 Pandas \u4EE5\u4F7F\u7528\u66F4\u5F3A\u5927\u7684\u529F\u80FD\uFF0C\u4F8B\u5982 "),no=l("strong"),d2=a("DataFrame.groupby()"),u2=a(" \u6216\u7528\u4E8E\u53EF\u89C6\u5316\u7684\u9AD8\u7EA7 API\u3002\u5E78\u8FD0\u7684\u662F\uFF0C\u{1F917} Datasets\u65E8\u5728\u4E0E Pandas\u3001NumPy\u3001PyTorch\u3001TensorFlow \u548C JAX \u7B49\u5E93\u53EF\u4EE5\u76F8\u4E92\u8F6C\u6362\u3002\u8BA9\u6211\u4EEC\u6765\u770B\u770B\u8FD9\u662F\u5982\u4F55\u5DE5\u4F5C\u7684\u3002"),Sf=f(),ns=l("h2"),Rs=l("a"),lo=l("span"),m(Ze.$$.fragment),m2=f(),ro=l("span"),_2=a("`\u{1F917} Datasets \u548C DataFrames \u7684\u76F8\u4E92\u8F6C\u6362"),Rf=f(),m(ta.$$.fragment),Pf=f(),Ps=l("p"),h2=a("\u4E3A\u4E86\u5B9E\u73B0\u5404\u79CD\u7B2C\u4E09\u65B9\u5E93\u4E4B\u95F4\u7684\u8F6C\u6362\uFF0C\u{1F917} Datasets \u63D0\u4F9B\u4E86\u4E00\u4E2A "),oo=l("strong"),c2=a("Dataset.set_format()"),g2=a(" \u529F\u80FD\u3002\u6B64\u529F\u80FD\u53EF\u4EE5\u901A\u8FC7\u4EC5\u66F4\u6539\u8F93\u51FA\u683C\u5F0F\u7684\uFF0C\u8F7B\u677E\u5207\u6362\u5230\u53E6\u4E00\u79CD\u683C\u5F0F\uFF0C\u800C\u4E0D\u4F1A\u5F71\u54CD\u5E95\u5C42\u6570\u636E\u683C\u5F0F\uFF0C\u5373 Apache Arrow\u3002\u683C\u5F0F\u5316\u4F1A\u5728\u6570\u636E\u672C\u8EAB\u4E0A\u8FDB\u884C\u3002\u4E3A\u4E86\u6F14\u793A\uFF0C\u8BA9\u6211\u4EEC\u5C06\u6570\u636E\u96C6\u8F6C\u6362\u4E3A Pandas\uFF1A"),Gf=f(),m(sa.$$.fragment),Cf=f(),Gs=l("p"),$2=a("\u73B0\u5728\uFF0C\u5F53\u6211\u4EEC\u8BBF\u95EE\u6570\u636E\u96C6\u7684\u5143\u7D20\u65F6\uFF0C\u6211\u4EEC\u4F1A\u5F97\u5230\u4E00\u4E2A "),io=l("strong"),v2=a("pandas.DataFrame"),w2=a(" \u800C\u4E0D\u662F\u5B57\u5178\uFF1A"),zf=f(),m(ea.$$.fragment),Af=f(),Gt=l("table"),po=l("thead"),y=l("tr"),If=l("th"),j2=f(),fo=l("th"),E2=a("patient_id"),b2=f(),uo=l("th"),x2=a("drugName"),T2=f(),mo=l("th"),D2=a("condition"),k2=f(),_o=l("th"),y2=a("review"),q2=f(),ho=l("th"),N2=a("rating"),O2=f(),co=l("th"),S2=a("date"),R2=f(),go=l("th"),P2=a("usefulCount"),G2=f(),$o=l("th"),C2=a("review_length"),z2=f(),ls=l("tbody"),S=l("tr"),vo=l("th"),A2=a("0"),I2=f(),wo=l("td"),H2=a("95260"),F2=f(),jo=l("td"),L2=a("Guanfacine"),M2=f(),Eo=l("td"),B2=a("adhd"),J2=f(),bo=l("td"),U2=a('"My son is halfway through his fourth week of Intuniv..."'),V2=f(),xo=l("td"),Y2=a("8.0"),W2=f(),To=l("td"),X2=a("April 27, 2010"),K2=f(),Do=l("td"),Q2=a("192"),Z2=f(),ko=l("td"),tg=a("141"),sg=f(),R=l("tr"),yo=l("th"),eg=a("1"),ag=f(),qo=l("td"),ng=a("92703"),lg=f(),No=l("td"),rg=a("Lybrel"),og=f(),Oo=l("td"),ig=a("birth control"),pg=f(),So=l("td"),fg=a('"I used to take another oral contraceptive, which had 21 pill cycle, and was very happy- very light periods, max 5 days, no other side effects..."'),dg=f(),Ro=l("td"),ug=a("5.0"),mg=f(),Po=l("td"),_g=a("December 14, 2009"),hg=f(),Go=l("td"),cg=a("17"),gg=f(),Co=l("td"),$g=a("134"),vg=f(),P=l("tr"),zo=l("th"),wg=a("2"),jg=f(),Ao=l("td"),Eg=a("138000"),bg=f(),Io=l("td"),xg=a("Ortho Evra"),Tg=f(),Ho=l("td"),Dg=a("birth control"),kg=f(),Fo=l("td"),yg=a('"This is my first time using any form of birth control..."'),qg=f(),Lo=l("td"),Ng=a("8.0"),Og=f(),Mo=l("td"),Sg=a("November 3, 2015"),Rg=f(),Bo=l("td"),Pg=a("10"),Gg=f(),Jo=l("td"),Cg=a("89"),Hf=f(),Ct=l("p"),zg=a("\u8BA9\u6211\u4EEC\u521B\u5EFA\u4E00\u4E2A "),Uo=l("strong"),Ag=a("pandas.DataFrame"),Ig=a(" \u6765\u9009\u62E9 "),Vo=l("strong"),Hg=a("drug_dataset[train]"),Fg=a(" \u7684\u6240\u6709\u5143\u7D20\uFF1A"),Ff=f(),m(aa.$$.fragment),Lf=f(),m(Cs.$$.fragment),Mf=f(),zs=l("p"),Lg=a("\u4ECE\u8FD9\u91CC\u6211\u4EEC\u53EF\u4EE5\u4F7F\u7528\u6211\u4EEC\u60F3\u8981\u7684\u6240\u6709 Pandas \u529F\u80FD\u3002\u4F8B\u5982\uFF0C\u6211\u4EEC\u53EF\u4EE5\u901A\u8FC7\u82B1\u5F0F\u94FE\u63A5\u6765\u8BA1\u7B97 "),Yo=l("strong"),Mg=a("condition"),Bg=a("\u7C7B\u4E4B\u95F4\u7684\u5206\u5E03 \uFF1A"),Bf=f(),m(na.$$.fragment),Jf=f(),zt=l("table"),Wo=l("thead"),At=l("tr"),Uf=l("th"),Jg=f(),Xo=l("th"),Ug=a("condition"),Vg=f(),Ko=l("th"),Yg=a("frequency"),Wg=f(),st=l("tbody"),rs=l("tr"),Qo=l("th"),Xg=a("0"),Kg=f(),Zo=l("td"),Qg=a("birth control"),Zg=f(),ti=l("td"),t1=a("27655"),s1=f(),os=l("tr"),si=l("th"),e1=a("1"),a1=f(),ei=l("td"),n1=a("depression"),l1=f(),ai=l("td"),r1=a("8023"),o1=f(),is=l("tr"),ni=l("th"),i1=a("2"),p1=f(),li=l("td"),f1=a("acne"),d1=f(),ri=l("td"),u1=a("5209"),m1=f(),ps=l("tr"),oi=l("th"),_1=a("3"),h1=f(),ii=l("td"),c1=a("anxiety"),g1=f(),pi=l("td"),$1=a("4991"),v1=f(),fs=l("tr"),fi=l("th"),w1=a("4"),j1=f(),di=l("td"),E1=a("pain"),b1=f(),ui=l("td"),x1=a("4744"),Vf=f(),It=l("p"),T1=a("\u4E00\u65E6\u6211\u4EEC\u5B8C\u6210\u4E86 Pandas \u5206\u6790\uFF0C\u6211\u4EEC\u603B\u662F\u901A\u8FC7\u4F7F\u7528\u5BF9\u8C61 "),mi=l("strong"),D1=a("Dataset.from_pandas()"),k1=a("\u65B9\u6CD5\u53EF\u4EE5\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684 "),_i=l("strong"),y1=a("Dataset"),q1=a(" \u5982\u4E0B\uFF1A"),Yf=f(),m(la.$$.fragment),Wf=f(),m(ra.$$.fragment),Xf=f(),m(As.$$.fragment),Kf=f(),pt=l("p"),N1=a("\u6211\u4EEC\u5BF9 \u{1F917} Datasets\u4E2D\u53EF\u7528\u7684\u5404\u79CD\u9884\u5904\u7406\u6280\u672F\u7684\u4ECB\u7ECD\u5230\u6B64\u7ED3\u675F\u3002\u5728\u6700\u540E\u4E00\u90E8\u5206\uFF0C\u8BA9\u6211\u4EEC\u521B\u5EFA\u4E00\u4E2A\u9A8C\u8BC1\u96C6\u6765\u51C6\u5907\u7528\u4E8E\u8BAD\u7EC3\u5206\u7C7B\u5668\u7684\u6570\u636E\u96C6\u3002\u5728\u6B64\u4E4B\u524D\uFF0C\u6211\u4EEC\u5C06\u8F93\u51FA\u683C\u5F0F "),hi=l("strong"),O1=a("drug_dataset"),S1=a(" \u4ECE "),ci=l("strong"),R1=a("pandas"),P1=a("\u91CD\u7F6E\u5230 "),gi=l("strong"),G1=a("arrow"),C1=a(" \uFF1A"),Qf=f(),m(oa.$$.fragment),Zf=f(),ia=l("h2"),z1=a("\u521B\u5EFA\u9A8C\u8BC1\u96C6"),td=f(),bn=l("p"),A1=a("\u5C3D\u7BA1\u6211\u4EEC\u6709\u4E00\u4E2A\u53EF\u4EE5\u7528\u4E8E\u8BC4\u4F30\u7684\u6D4B\u8BD5\u96C6\uFF0C\u4F46\u5728\u5F00\u53D1\u8FC7\u7A0B\u4E2D\u4FDD\u6301\u6D4B\u8BD5\u96C6\u4E0D\u53D8\u5E76\u521B\u5EFA\u4E00\u4E2A\u5355\u72EC\u7684\u9A8C\u8BC1\u96C6\u662F\u4E00\u4E2A\u5F88\u597D\u7684\u505A\u6CD5\u3002\u4E00\u65E6\u60A8\u5BF9\u6A21\u578B\u5728\u6D4B\u8BD5\u96C6\u4E0A\u7684\u8868\u73B0\u611F\u5230\u6EE1\u610F\uFF0C\u60A8\u5C31\u53EF\u4EE5\u5BF9\u9A8C\u8BC1\u96C6\u8FDB\u884C\u6700\u7EC8\u7684\u68C0\u67E5\u3002\u6B64\u8FC7\u7A0B\u6709\u52A9\u4E8E\u964D\u4F4E\u60A8\u8FC7\u62DF\u5408\u6D4B\u8BD5\u96C6\u5E76\u90E8\u7F72\u5728\u73B0\u5B9E\u4E16\u754C\u6570\u636E\u4E0A\u5931\u8D25\u7684\u6A21\u578B\u7684\u98CE\u9669\u3002"),sd=f(),J=l("p"),I1=a("\u{1F917} Datasets\u63D0\u4F9B\u4E86\u4E00\u4E2A\u57FA\u4E8E"),$i=l("strong"),H1=a("scikit-learn"),F1=a("\u7684\u7ECF\u5178\u65B9\u6CD5"),vi=l("strong"),L1=a("Dataset.train_test_split()"),M1=a(" .\u8BA9\u6211\u4EEC\u7528\u5B83\u628A\u6211\u4EEC\u7684\u8BAD\u7EC3\u96C6\u5206\u6210 "),wi=l("strong"),B1=a("train"),J1=a(" \u548C "),ji=l("strong"),U1=a("validation"),V1=a(" \uFF08\u4E3A\u4E86\u53EF\u4EE5\u590D\u73B0\uFF0C\u6211\u4EEC\u5C06\u8BBE\u7F6E"),Ei=l("strong"),Y1=a("seed"),W1=a("\u7684\u503C\u4E3A\u4E00\u4E2A\u5E38\u91CF\uFF09\uFF1A"),ed=f(),m(pa.$$.fragment),ad=f(),m(fa.$$.fragment),nd=f(),xn=l("p"),X1=a("\u592A\u597D\u4E86\uFF0C\u6211\u4EEC\u73B0\u5728\u5DF2\u7ECF\u51C6\u5907\u597D\u4E86\u4E00\u4E2A\u6570\u636E\u96C6\uFF0C\u53EF\u4EE5\u7528\u6765\u8BAD\u7EC3\u4E00\u4E9B\u6A21\u578B\u4E86\uFF01\u5728[\u7B2C\u4E94\u8282]](/course/chapter5/5)\u6211\u4EEC\u5C06\u5411\u60A8\u5C55\u793A\u5982\u4F55\u5C06\u6570\u636E\u96C6\u4E0A\u4F20\u5230 Hugging Face Hub\uFF0C\u4F46\u73B0\u5728\u8BA9\u6211\u4EEC\u67E5\u770B\u5728\u672C\u5730\u8BA1\u7B97\u673A\u4E0A\u4FDD\u5B58\u6570\u636E\u96C6\u7684\u51E0\u79CD\u65B9\u6CD5\u3002"),ld=f(),da=l("h2"),K1=a("\u4FDD\u5B58\u6570\u636E\u96C6"),rd=f(),m(ua.$$.fragment),od=f(),Tn=l("p"),Q1=a("\u867D\u7136 \u{1F917} Datasets \u4F1A\u7F13\u5B58\u6BCF\u4E2A\u4E0B\u8F7D\u7684\u6570\u636E\u96C6\u548C\u5BF9\u5B83\u6267\u884C\u7684\u64CD\u4F5C\uFF0C\u4F46\u6709\u65F6\u4F60\u4F1A\u60F3\u8981\u5C06\u6570\u636E\u96C6\u4FDD\u5B58\u5230\u78C1\u76D8\uFF08\u4F8B\u5982\uFF0C\u4EE5\u9632\u7F13\u5B58\u88AB\u5220\u9664\uFF09\u3002\u5982\u4E0B\u8868\u6240\u793A\uFF0C\u{1F917} Datasets \u63D0\u4F9B\u4E86\u4E09\u4E2A\u4E3B\u8981\u529F\u80FD\u6765\u4EE5\u4E0D\u540C\u7684\u683C\u5F0F\u4FDD\u5B58\u60A8\u7684\u6570\u636E\u96C6\uFF1A"),id=f(),Is=l("table"),bi=l("thead"),ma=l("tr"),Dn=l("th"),Z1=a("\u6570\u636E\u683C\u5F0F"),t$=f(),kn=l("th"),s$=a("\u5BF9\u5E94\u7684\u65B9\u6CD5"),e$=f(),ds=l("tbody"),_a=l("tr"),yn=l("td"),a$=a("Arrow"),n$=f(),qn=l("td"),xi=l("code"),l$=a("Dataset.save_to_disk()"),r$=f(),ha=l("tr"),Nn=l("td"),o$=a("CSV"),i$=f(),On=l("td"),Ti=l("code"),p$=a("Dataset.to_csv()"),f$=f(),ca=l("tr"),Sn=l("td"),d$=a("JSON"),u$=f(),Rn=l("td"),Di=l("code"),m$=a("Dataset.to_json()"),pd=f(),Pn=l("p"),_$=a("\u4F8B\u5982\uFF0C\u8BA9\u6211\u4EEC\u4EE5 Arrow \u683C\u5F0F\u4FDD\u5B58\u6211\u4EEC\u6E05\u6D17\u8FC7\u7684\u6570\u636E\u96C6\uFF1A"),fd=f(),m(ga.$$.fragment),dd=f(),Gn=l("p"),h$=a("\u8FD9\u5C06\u521B\u5EFA\u4E00\u4E2A\u5177\u6709\u4EE5\u4E0B\u7ED3\u6784\u7684\u76EE\u5F55\uFF1A"),ud=f(),m($a.$$.fragment),md=f(),Cn=l("p"),c$=a("\u5728\u90A3\u91CC\u6211\u4EEC\u53EF\u4EE5\u770B\u5230\u6BCF\u4E2A\u90E8\u5206.arrow\u8868\uFF0C\u4EE5\u53CA\u4E00\u4E9B\u5143\u6570\u636E\u6570\u636E\u96C6\u4FE1\u606F.json\u548C\u72B6\u6001\u6587\u4EF6\u4FDD\u5B58\u5728\u4E00\u8D77.\u60A8\u53EF\u4EE5\u5C06 Arrow \u683C\u5F0F\u89C6\u4E3A\u4E00\u4E2A\u7CBE\u7F8E\u7684\u5217\u548C\u884C\u7684\u8868\u683C\uFF0C\u5B83\u9488\u5BF9\u6784\u5EFA\u5904\u7406\u548C\u4F20\u8F93\u5927\u578B\u6570\u636E\u96C6\u7684\u9AD8\u6027\u80FD\u5E94\u7528\u7A0B\u5E8F\u8FDB\u884C\u4E86\u4F18\u5316\u3002"),_d=f(),Hs=l("p"),g$=a("\u4FDD\u5B58\u6570\u636E\u96C6\u540E\uFF0C\u6211\u4EEC\u53EF\u4EE5\u4F7F\u7528 "),ki=l("strong"),$$=a("load_from_disk()"),v$=a(" \u529F\u80FD\u4ECE\u78C1\u76D8\u8BFB\u53D6\u6570\u636E\u5982\u4E0B\uFF1A"),hd=f(),m(va.$$.fragment),cd=f(),m(wa.$$.fragment),gd=f(),Fs=l("p"),w$=a("\u5BF9\u4E8E CSV \u548C JSON \u683C\u5F0F\uFF0C\u6211\u4EEC\u5FC5\u987B\u5C06\u6BCF\u4E2A\u90E8\u5206\u5B58\u50A8\u4E3A\u5355\u72EC\u7684\u6587\u4EF6\u3002\u4E00\u79CD\u65B9\u6CD5\u662F\u8FED\u4EE3"),yi=l("strong"),j$=a("DatasetDict"),E$=a("\u4E2D\u7684\u952E\u548C\u503C \uFF1A"),$d=f(),m(ja.$$.fragment),vd=f(),Ls=l("p"),b$=a("\u8FD9\u5C06\u4FDD\u5B58\u6BCF\u4E2A\u62C6\u5206\u90FD\u662F"),Ea=l("a"),x$=a("JSON\u7684\u6807\u51C6\u683C\u5F0F"),T$=a("\uFF0C\u5176\u4E2D\u6570\u636E\u96C6\u4E2D\u7684\u6BCF\u4E00\u884C\u90FD\u5B58\u50A8\u4E3A\u4E00\u884C JSON\u3002\u8FD9\u662F\u7B2C\u4E00\u4E2A\u793A\u4F8B\uFF1A"),wd=f(),m(ba.$$.fragment),jd=f(),m(xa.$$.fragment),Ed=f(),Ms=l("p"),D$=a("\u7136\u540E\u6211\u4EEC\u53EF\u4EE5\u4F7F\u7528"),zn=l("a"),k$=a("\u7B2C\u4E8C\u8282"),y$=a("\u5B66\u8FC7\u7684\u6280\u672F\u52A0\u8F7D JSON \u6587\u4EF6\u5982\u4E0B\uFF1A"),bd=f(),m(Ta.$$.fragment),xd=f(),An=l("p"),q$=a("\u8FD9\u5C31\u662F\u6211\u4EEC\u63A2\u7D22 \u{1F917} Datasets \u7684\u65C5\u7A0B\uFF01\u73B0\u5728\u6211\u4EEC\u6709\u4E86\u4E00\u4E2A\u6E05\u6D17\u8FC7\u7684\u6570\u636E\u96C6\uFF0C\u4EE5\u4E0B\u662F\u60A8\u53EF\u4EE5\u5C1D\u8BD5\u7684\u4E00\u4E9B\u60F3\u6CD5\uFF1A"),Td=f(),Bs=l("ol"),Da=l("li"),N$=a("\u4F7F\u7528"),In=l("a"),O$=a("\u7B2C3\u7AE0"),S$=a("\u7684\u6280\u672F\u6765\u8BAD\u7EC3\u4E00\u4E2A\u5206\u7C7B\u5668\uFF0C\u5B83\u53EF\u4EE5\u6839\u636E\u836F\u7269\u8BC4\u8BBA\u9884\u6D4B\u75C5\u4EBA\u7684\u60C5\u51B5\u3002"),R$=f(),ka=l("li"),P$=a("\u4F7F\u7528 "),Hn=l("a"),G$=a("Chapter 1"),C$=a(" \u4E2D\u7684\u201Csummarization\u201D\u7BA1\u9053\u751F\u6210\u8BC4\u8BBA\u6458\u8981\u3002"),Dd=f(),Fn=l("p"),z$=a("\u63A5\u4E0B\u6765\uFF0C\u6211\u4EEC\u5C06\u770B\u770B \u{1F917} Datasets\u5982\u4F55\u4F7F\u60A8\u80FD\u591F\u5728\u4E0D\u6491\u7206\u7B14\u8BB0\u672C\u7535\u8111\u5185\u5B58\u7684\u60C5\u51B5\u4E0B\u5904\u7406\u5E9E\u5927\u7684\u6570\u636E\u96C6\uFF01"),this.h()},l(t){const i=h4('[data-svelte="svelte-1phssyn"]',document.head);u=r(i,"META",{name:!0,content:!0}),i.forEach(e),b=d(t),j=r(t,"H1",{id:!0});var qi=o(j);E=n(qi,"\u662F\u65F6\u5019\u6765\u5B66\u4E00\u4E0B\u5207\u7247\u4E86"),qi.forEach(e),G=d(t),_(x.$$.fragment,t),k=d(t),q=r(t,"P",{});var Ni=o(q);N=n(Ni,"\u5927\u591A\u6570\u60C5\u51B5\u4E0B\uFF0C\u60A8\u4F7F\u7528\u7684\u6570\u636E\u90FD\u9700\u6839\u636E\u6A21\u578B\u6240\u8981\u6C42\u7684\u8F93\u5165\u8FDB\u884C\u6E05\u6D17\u3002\u5728\u672C\u8282\u4E2D\uFF0C\u6211\u4EEC\u5C06\u63A2\u7D22 \u{1F917} Datasets \u63D0\u4F9B\u7684\u7528\u4E8E\u6570\u636E\u96C6\u6E05\u6D17\u7684\u5404\u79CD\u529F\u80FD\u3002"),Ni.forEach(e),O=d(t),_(A.$$.fragment,t),C=d(t),U=r(t,"H2",{id:!0});var Oi=o(U);ut=n(Oi,"\u5207\u7247\u4E0E\u5207\u5206\u6211\u4EEC\u7684\u6570\u636E"),Oi.forEach(e),M=d(t),T=r(t,"P",{});var et=o(T);$t=n(et,"\u4E0E Pandas \u7C7B\u4F3C\uFF0C\u{1F917} Datasets \u63D0\u4F9B\u4E86\u51E0\u4E2A\u51FD\u6570\u6765\u64CD\u4F5C "),V=r(et,"STRONG",{});var Si=o(V);vt=n(Si,"Dataset"),Si.forEach(e),wt=n(et," \u548C "),mt=r(et,"STRONG",{});var Ri=o(mt);Zs=n(Ri,"DatasetDict"),Ri.forEach(e),te=n(et," \u5BF9\u8C61\u3002\u6211\u4EEC\u5728"),at=r(et,"A",{href:!0});var Pi=o(at);se=n(Pi,"\u7B2C\u4E09\u7AE0"),Pi.forEach(e),ee=n(et,"\u5DF2\u7ECF\u9047\u5230\u4E86 "),_t=r(et,"STRONG",{});var Gi=o(_t);D=n(Gi,"Dataset.map()"),Gi.forEach(e),Na=n(et," \u65B9\u6CD5\uFF0C\u5728\u672C\u8282\u4E2D\uFF0C\u6211\u4EEC\u5C06\u63A2\u7D22\u6211\u4EEC\u53EF\u4EE5\u4F7F\u7528\u7684\u5176\u4ED6\u529F\u80FD\u3002"),et.forEach(e),ae=d(t),tt=r(t,"P",{});var Ln=o(tt);Oa=n(Ln,"\u5BF9\u4E8E\u8FD9\u4E2A\u4F8B\u5B50\uFF0C\u6211\u4EEC\u5C06\u4F7F\u7528\u6258\u7BA1\u5728"),jt=r(Ln,"A",{href:!0,rel:!0});var L$=o(jt);Sa=n(L$,"\u52A0\u5DDE\u5927\u5B66\u6B27\u6587\u5206\u6821\u673A\u5668\u5B66\u4E60\u5B58\u50A8\u5E93"),L$.forEach(e),Ra=n(Ln,"\u7684"),Et=r(Ln,"A",{href:!0,rel:!0});var M$=o(Et);iu=n(M$,"\u836F\u7269\u5BA1\u67E5\u6570\u636E\u96C6"),M$.forEach(e),pu=n(Ln,"\uFF0C\u5176\u4E2D\u5305\u542B\u60A3\u8005\u5BF9\u5404\u79CD\u836F\u7269\u7684\u8BC4\u8BBA\uFF0C\u4EE5\u53CA\u6B63\u5728\u6CBB\u7597\u7684\u75C5\u60C5\u548C\u60A3\u8005\u6EE1\u610F\u5EA6\u7684 10 \u661F\u8BC4\u7EA7\u3002"),Ln.forEach(e),Ci=d(t),bt=r(t,"P",{});var Mn=o(bt);fu=n(Mn,"\u9996\u5148\u6211\u4EEC\u9700\u8981\u4E0B\u8F7D\u5E76\u63D0\u53D6\u6570\u636E\uFF0C\u8FD9\u53EF\u4EE5\u901A\u8FC7 "),wl=r(Mn,"STRONG",{});var B$=o(wl);du=n(B$,"wget"),B$.forEach(e),uu=n(Mn," \u548C "),jl=r(Mn,"STRONG",{});var J$=o(jl);mu=n(J$,"unzip"),J$.forEach(e),_u=n(Mn," \u547D\u4EE4\uFF1A"),Mn.forEach(e),zi=d(t),_(ne.$$.fragment,t),Ai=d(t),xt=r(t,"P",{});var Bn=o(xt);hu=n(Bn,"\u7531\u4E8E TSV \u53EA\u662F\u4F7F\u7528\u5236\u8868\u7B26\u800C\u4E0D\u662F\u9017\u53F7\u4F5C\u4E3A\u5206\u9694\u7B26\u7684 CSV \u53D8\u4F53\uFF0C\u6211\u4EEC\u53EF\u4EE5\u4F7F\u7528\u52A0\u8F7D"),El=r(Bn,"STRONG",{});var U$=o(El);cu=n(U$,"csv"),U$.forEach(e),gu=n(Bn,"\u6587\u4EF6\u7684"),bl=r(Bn,"STRONG",{});var V$=o(bl);$u=n(V$,"load_dataset()"),V$.forEach(e),vu=n(Bn,"\u51FD\u6570\u5E76\u6307\u5B9A\u5206\u9694\u7B26 \u793A\u4F8B\u5982\u4E0B\uFF1A"),Bn.forEach(e),Ii=d(t),_(le.$$.fragment,t),Hi=d(t),Tt=r(t,"P",{});var Jn=o(Tt);wu=n(Jn,"\u5728\u8FDB\u884C\u4EFB\u4F55\u7C7B\u578B\u7684\u6570\u636E\u5206\u6790\u65F6\uFF0C\u4E00\u4E2A\u597D\u7684\u505A\u6CD5\u662F\u62BD\u53D6\u4E00\u4E2A\u5C0F\u7684\u968F\u673A\u6837\u672C\uFF0C\u4EE5\u5FEB\u901F\u4E86\u89E3\u60A8\u6B63\u5728\u5904\u7406\u7684\u6570\u636E\u7C7B\u578B\u3002\u5728\u{1F917}\u6570\u636E\u96C6\u4E2D\uFF0C\u6211\u4EEC\u53EF\u4EE5\u901A\u8FC7\u94FE\u63A5 "),xl=r(Jn,"STRONG",{});var Y$=o(xl);ju=n(Y$,"Dataset.shuffle()"),Y$.forEach(e),Eu=n(Jn," \u548C "),Tl=r(Jn,"STRONG",{});var W$=o(Tl);bu=n(W$,"Dataset.select()"),W$.forEach(e),xu=n(Jn," \u5171\u540C\u6765\u5B8C\u6210\u62BD\u53D6\uFF1A"),Jn.forEach(e),Fi=d(t),_(re.$$.fragment,t),Li=d(t),_(oe.$$.fragment,t),Mi=d(t),nt=r(t,"P",{});var Js=o(nt);Tu=n(Js,"\u8BF7\u6CE8\u610F\uFF0C\u51FA\u4E8E\u53EF\u4EE5\u590D\u73B0\u7684\u76EE\u7684\uFF0C\u6211\u4EEC\u5DF2\u5C06\u5728"),Dl=r(Js,"STRONG",{});var X$=o(Dl);Du=n(X$,"Dataset.shuffle()"),X$.forEach(e),ku=n(Js,"\u9009\u53D6\u4E86\u56FA\u5B9A\u7684\u968F\u673A\u6570\u79CD\u5B50\u3002 "),kl=r(Js,"STRONG",{});var K$=o(kl);yu=n(K$,"Dataset.select()"),K$.forEach(e),qu=n(Js," \u9700\u8981\u4E00\u4E2A\u53EF\u8FED\u4EE3\u7684\u7D22\u5F15\uFF0C\u6240\u4EE5\u6211\u4EEC\u5DF2\u7ECF\u901A\u8FC7\u4E86 "),yl=r(Js,"STRONG",{});var Q$=o(yl);Nu=n(Q$,"range(1000)"),Q$.forEach(e),Ou=n(Js," \u4ECE\u968F\u673A\u6253\u4E71\u7684\u6570\u636E\u96C6\u4E2D\u9009\u53D6\u524D 1,000 \u4E2A\u793A\u4F8B\u3002\u4ECE\u62BD\u53D6\u7684\u6570\u636E\u4E2D\uFF0C\u6211\u4EEC\u5DF2\u7ECF\u53EF\u4EE5\u770B\u5230\u6211\u4EEC\u6570\u636E\u96C6\u7684\u4E00\u4E9B\u7279\u70B9\uFF1A"),Js.forEach(e),Bi=d(t),Dt=r(t,"UL",{});var Un=o(Dt);Pa=r(Un,"LI",{});var A$=o(Pa);ql=r(A$,"STRONG",{});var Z$=o(ql);Su=n(Z$,"Unnamed: 0"),Z$.forEach(e),Ru=n(A$,"\u8FD9\u5217\u770B\u8D77\u6765\u5F88\u50CF\u6BCF\u4E2A\u60A3\u8005\u7684\u533F\u540D ID\u3002"),A$.forEach(e),Pu=d(Un),Ga=r(Un,"LI",{});var I$=o(Ga);Nl=r(I$,"STRONG",{});var tv=o(Nl);Gu=n(tv,"condition"),tv.forEach(e),Cu=n(I$," \u8FD9\u5217\u5305\u542B\u6709\u63CF\u8FF0\u5065\u5EB7\u72B6\u51B5\u7684\u6807\u7B7E\u3002"),I$.forEach(e),zu=d(Un),Vt=r(Un,"LI",{});var Vn=o(Vt);Au=n(Vn,"\u8BC4\u8BBA\u957F\u77ED\u4E0D\u4E00\uFF0C\u6DF7\u5408\u6709 Python \u884C\u5206\u9694\u7B26 ("),Ol=r(Vn,"STRONG",{});var sv=o(Ol);Iu=n(sv,"\\r\\n"),sv.forEach(e),Hu=n(Vn,") \u4EE5\u53CA HTML \u5B57\u7B26\u4EE3\u7801\uFF0C\u5982"),Sl=r(Vn,"STRONG",{});var ev=o(Sl);Fu=n(ev,"'"),ev.forEach(e),Lu=n(Vn,"\u3002"),Vn.forEach(e),Un.forEach(e),Ji=d(t),kt=r(t,"P",{});var Yn=o(kt);Mu=n(Yn,"\u8BA9\u6211\u4EEC\u770B\u770B\u6211\u4EEC\u5982\u4F55\u4F7F\u7528 \u{1F917} Datasets \u6765\u5904\u7406\u8FD9\u4E9B\u95EE\u9898\u3002\u4E3A\u4E86\u9A8C\u8BC1"),Rl=r(Yn,"STRONG",{});var av=o(Rl);Bu=n(av,"Unnamed: 0"),av.forEach(e),Ju=n(Yn," \u5217\u5B58\u50A8\u7684\u662F\u60A3\u8005 ID\u7684\u731C\u60F3\uFF0C\u6211\u4EEC\u53EF\u4EE5\u4F7F\u7528 "),Pl=r(Yn,"STRONG",{});var nv=o(Pl);Uu=n(nv,"Dataset.unique()"),nv.forEach(e),Vu=n(Yn," \u51FD\u6570\u6765\u9A8C\u8BC1\u533F\u540DID \u7684\u6570\u91CF\u662F\u5426\u4E0E\u62C6\u5206\u540E\u6BCF\u90E8\u5206\u4E2D\u7684\u884C\u6570\u5339\u914D\uFF1A"),Yn.forEach(e),Ui=d(t),_(ie.$$.fragment,t),Vi=d(t),yt=r(t,"P",{});var Wn=o(yt);Yu=n(Wn,"\u8FD9\u4F3C\u4E4E\u8BC1\u5B9E\u4E86\u6211\u4EEC\u7684\u5047\u8BBE\uFF0C\u6240\u4EE5\u8BA9\u6211\u4EEC\u628A "),Gl=r(Wn,"STRONG",{});var lv=o(Gl);Wu=n(lv,"Unnamed: 0"),lv.forEach(e),Xu=n(Wn," \u5217\u91CD\u547D\u540D\u4E3A\u60A3\u8005\u7684id\u3002\u6211\u4EEC\u53EF\u4EE5\u4F7F\u7528 "),Cl=r(Wn,"STRONG",{});var rv=o(Cl);Ku=n(rv,"DatasetDict.rename_column()"),rv.forEach(e),Qu=n(Wn,"\u51FD\u6570\u4E00\u6B21\u6027\u91CD\u547D\u540DDatasetDict\u4E2D\u5171\u6709\u7684\u5217\uFF1A"),Wn.forEach(e),Yi=d(t),_(pe.$$.fragment,t),Wi=d(t),_(fe.$$.fragment,t),Xi=d(t),_(us.$$.fragment,t),Ki=d(t),Y=r(t,"P",{});var Ht=o(Y);Zu=n(Ht,"\u63A5\u4E0B\u6765\uFF0C\u8BA9\u6211\u4EEC\u4F7F\u7528 "),zl=r(Ht,"STRONG",{});var ov=o(zl);tm=n(ov,"Dataset.map()"),ov.forEach(e),sm=n(Ht,"\u6807\u51C6\u5316\u6240\u6709 "),Al=r(Ht,"STRONG",{});var iv=o(Al);em=n(iv,"condition"),iv.forEach(e),am=n(Ht," \u6807\u7B7E .\u6B63\u5982\u6211\u4EEC\u5728"),Ca=r(Ht,"A",{href:!0});var pv=o(Ca);nm=n(pv,"\u7B2C\u4E09\u7AE0"),pv.forEach(e),lm=n(Ht,"\u4E2D\u6240\u505A\u7684\u90A3\u6837\uFF0C\u6211\u4EEC\u53EF\u4EE5\u5B9A\u4E49\u4E00\u4E2A\u7B80\u5355\u7684\u51FD\u6570\uFF0C\u53EF\u4EE5\u5C06\u8BE5\u51FD\u6570\u5E94\u7528\u4E8E"),Il=r(Ht,"STRONG",{});var fv=o(Il);rm=n(fv,"drug_dataset"),fv.forEach(e),om=n(Ht," \u62C6\u5206\u540E\u6BCF\u90E8\u5206\u7684\u6240\u6709\u884C\uFF1A"),Ht.forEach(e),Qi=d(t),_(de.$$.fragment,t),Zi=d(t),_(ue.$$.fragment,t),tp=d(t),W=r(t,"P",{});var Ft=o(W);im=n(Ft,"\u54E6\u4E0D\uFF0C\u6211\u4EEC\u7684map\u529F\u80FD\u9047\u5230\u4E86\u95EE\u9898\uFF01\u4ECE\u9519\u8BEF\u4E2D\u6211\u4EEC\u53EF\u4EE5\u63A8\u65AD\u51FA "),Hl=r(Ft,"STRONG",{});var dv=o(Hl);pm=n(dv,"condition"),dv.forEach(e),fm=n(Ft," \u5217\u5B58\u5728 "),Fl=r(Ft,"STRONG",{});var uv=o(Fl);dm=n(uv,"None"),uv.forEach(e),um=n(Ft," , \u4E0D\u80FD\u8F6C\u6362\u4E3A\u5C0F\u5199\uFF0C\u56E0\u4E3A\u5B83\u4EEC\u4E0D\u662F\u5B57\u7B26\u4E32\u3002\u8BA9\u6211\u4EEC\u4F7F\u7528 "),Ll=r(Ft,"STRONG",{});var mv=o(Ll);mm=n(mv,"Dataset.filter()"),mv.forEach(e),_m=n(Ft," \u5220\u9664\u8FD9\u4E9B\u884C \uFF0C\u5176\u5DE5\u4F5C\u65B9\u5F0F\u7C7B\u4F3C\u4E8E "),Ml=r(Ft,"STRONG",{});var _v=o(Ml);hm=n(_v,"Dataset.map()"),_v.forEach(e),cm=n(Ft," \u3002\u4F8B\u5982\uFF1A"),Ft.forEach(e),sp=d(t),_(me.$$.fragment,t),ep=d(t),ms=r(t,"P",{});var yd=o(ms);gm=n(yd,"\u7136\u540E\u8FD0\u884C "),Bl=r(yd,"STRONG",{});var hv=o(Bl);$m=n(hv,"drug_dataset.filter(filter_nones)"),hv.forEach(e),vm=n(yd," \uFF0C\u6211\u4EEC\u53EF\u4EE5\u5728\u4E00\u884C\u4E2D\u4F7F\u7528lambda \u51FD\u6570.\u5728 Python \u4E2D\uFF0Clambda \u51FD\u6570\u662F\u60A8\u65E0\u9700\u660E\u786E\u547D\u540D\u5373\u53EF\u4F7F\u7528\u7684\u5FAE\u51FD\u6570\uFF08\u533F\u540D\u51FD\u6570\uFF09\u3002\u5B83\u4EEC\u4E00\u822C\u91C7\u7528\u5982\u4E0B\u5F62\u5F0F\uFF1A"),yd.forEach(e),ap=d(t),_(_e.$$.fragment,t),np=d(t),X=r(t,"P",{});var Lt=o(X);wm=n(Lt,"\u5176\u4E2D"),Jl=r(Lt,"STRONG",{});var cv=o(Jl);jm=n(cv,"lambda"),cv.forEach(e),Em=n(Lt," \u662F Python \u7684\u7279\u6B8A"),he=r(Lt,"A",{href:!0,rel:!0});var gv=o(he);bm=n(gv,"\u5173\u952E\u5B57"),gv.forEach(e),xm=n(Lt,", "),Ul=r(Lt,"STRONG",{});var $v=o(Ul);Tm=n($v,"arguments"),$v.forEach(e),Dm=n(Lt," \u662F\u4EE5\u9017\u53F7\u8FDB\u884C\u5206\u9694\u7684\u51FD\u6570\u8F93\u5165\u7684\u5217\u8868/\u96C6\u5408\uFF0C "),Vl=r(Lt,"STRONG",{});var vv=o(Vl);km=n(vv,"expression"),vv.forEach(e),ym=n(Lt," \u4EE3\u8868\u60A8\u5E0C\u671B\u6267\u884C\u7684\u64CD\u4F5C\u3002\u4F8B\u5982\uFF0C\u6211\u4EEC\u53EF\u4EE5\u5B9A\u4E49\u4E00\u4E2A\u7B80\u5355\u7684 lambda \u51FD\u6570\u6765\u5BF9\u4E00\u4E2A\u6570\u5B57\u8FDB\u884C\u5E73\u65B9\uFF0C\u5982\u4E0B\u6240\u793A\uFF1A"),Lt.forEach(e),lp=d(t),_(ce.$$.fragment,t),rp=d(t),za=r(t,"P",{});var wv=o(za);qm=n(wv,"\u6211\u4EEC\u9700\u8981\u5C06\u8981\u8F93\u5165\u7ED9\u8FD9\u4E2A\u51FD\u6570\u503C\u62EC\u5728\u62EC\u53F7\u4E2D\uFF1A"),wv.forEach(e),op=d(t),_(ge.$$.fragment,t),ip=d(t),_($e.$$.fragment,t),pp=d(t),Aa=r(t,"P",{});var jv=o(Aa);Nm=n(jv,"\u7C7B\u4F3C\u5730\uFF0C\u6211\u4EEC\u53EF\u4EE5\u901A\u8FC7\u7528\u9017\u53F7\u5206\u9694\u591A\u4E2A\u53C2\u6570\u6765\u5B9A\u4E49 lambda \u51FD\u6570\u3002\u4F8B\u5982\uFF0C\u6211\u4EEC\u53EF\u4EE5\u6309\u5982\u4E0B\u65B9\u5F0F\u8BA1\u7B97\u4E09\u89D2\u5F62\u7684\u9762\u79EF\uFF1A"),jv.forEach(e),fp=d(t),_(ve.$$.fragment,t),dp=d(t),_(we.$$.fragment,t),up=d(t),qt=r(t,"P",{});var Xn=o(qt);Om=n(Xn,"\u5F53\u60A8\u60F3\u5B9A\u4E49\u5C0F\u578B\u3001\u4E00\u6B21\u6027\u4F7F\u7528\u7684\u51FD\u6570\u65F6\uFF0CLambda \u51FD\u6570\u975E\u5E38\u65B9\u4FBF\uFF08\u6709\u5173\u5B83\u4EEC\u7684\u66F4\u591A\u4FE1\u606F\uFF0C\u6211\u4EEC\u5EFA\u8BAE\u9605\u8BFB\u5B89\u5FB7\u70C8\xB7\u5E03\u5C14\u9AD8\u5199\u7684"),je=r(Xn,"A",{href:!0,rel:!0});var Ev=o(je);Sm=n(Ev,"\u771F\u6B63\u7684Python\u6559\u7A0B"),Ev.forEach(e),Rm=n(Xn,"\uFF09\u3002\u5728\u{1F917} Datasets \u4E2D\uFF0C\u6211\u4EEC\u53EF\u4EE5\u4F7F\u7528 lambda \u51FD\u6570\u6765\u5B9A\u4E49\u7B80\u5355\u7684\u6620\u5C04\u548C\u8FC7\u6EE4\u64CD\u4F5C\uFF0C\u6240\u4EE5\u8BA9\u6211\u4EEC\u4F7F\u7528\u8FD9\u4E2A\u6280\u5DE7\u6765\u6D88\u9664\u6211\u4EEC\u6570\u636E\u96C6\u4E2D\u7684 "),Yl=r(Xn,"STRONG",{});var bv=o(Yl);Pm=n(bv,"None"),bv.forEach(e),Gm=n(Xn," \u6761\u76EE\uFF1A"),Xn.forEach(e),mp=d(t),_(Ee.$$.fragment,t),_p=d(t),Nt=r(t,"P",{});var Kn=o(Nt);Cm=n(Kn,"\u5F53 "),Wl=r(Kn,"STRONG",{});var xv=o(Wl);zm=n(xv,"None"),xv.forEach(e),Am=n(Kn," \u6761\u76EE\u5DF2\u5220\u9664\uFF0C\u6211\u4EEC\u53EF\u4EE5\u6807\u51C6\u5316\u6211\u4EEC\u7684 "),Xl=r(Kn,"STRONG",{});var Tv=o(Xl);Im=n(Tv,"condition"),Tv.forEach(e),Hm=n(Kn," \u5217\uFF1A"),Kn.forEach(e),hp=d(t),_(be.$$.fragment,t),cp=d(t),_(xe.$$.fragment,t),gp=d(t),Ia=r(t,"P",{});var Dv=o(Ia);Fm=n(Dv,"\u6709\u7528\uFF01\u73B0\u5728\u6211\u4EEC\u5DF2\u7ECF\u6E05\u7406\u4E86\u6807\u7B7E\uFF0C\u8BA9\u6211\u4EEC\u6765\u770B\u770B\u6E05\u6D17\u540E\u7684\u8BC4\u8BBA\u6587\u672C\u3002"),Dv.forEach(e),$p=d(t),Yt=r(t,"H2",{class:!0});var qd=o(Yt);_s=r(qd,"A",{id:!0,class:!0,href:!0});var kv=o(_s);Kl=r(kv,"SPAN",{});var yv=o(Kl);_(Te.$$.fragment,yv),yv.forEach(e),kv.forEach(e),Lm=d(qd),Ql=r(qd,"SPAN",{});var qv=o(Ql);Mm=n(qv,"Creating new columns"),qv.forEach(e),qd.forEach(e),vp=d(t),Ha=r(t,"P",{});var Nv=o(Ha);Bm=n(Nv,"\u6BCF\u5F53\u60A8\u5904\u7406\u5BA2\u6237\u8BC4\u8BBA\u65F6\uFF0C\u4E00\u4E2A\u597D\u7684\u505A\u6CD5\u662F\u68C0\u67E5\u6BCF\u4E2A\u8BC4\u8BBA\u4E2D\u7684\u5B57\u6570\u3002\u8BC4\u8BBA\u53EF\u80FD\u53EA\u662F\u4E00\u4E2A\u8BCD\uFF0C\u6BD4\u5982\u201C\u592A\u68D2\u4E86\uFF01\u201D\u6216\u5305\u542B\u6570\u5343\u5B57\u7684\u5B8C\u6574\u6587\u7AE0\uFF0C\u6839\u636E\u5B9E\u9645\u7684\u60C5\u51B5\uFF0C\u60A8\u9700\u8981\u4EE5\u4E0D\u540C\u7684\u65B9\u5F0F\u5904\u7406\u8FD9\u4E9B\u6781\u7AEF\u60C5\u51B5\u3002\u4E3A\u4E86\u8BA1\u7B97\u6BCF\u6761\u8BC4\u8BBA\u4E2D\u7684\u5355\u8BCD\u6570\uFF0C\u6211\u4EEC\u5C06\u4F7F\u7528\u57FA\u4E8E\u7A7A\u683C\u5206\u5272\u6BCF\u4E2A\u6587\u672C\u7684\u7C97\u7565\u65B9\u6CD5\u3002"),Nv.forEach(e),wp=d(t),Fa=r(t,"P",{});var Ov=o(Fa);Jm=n(Ov,"\u8BA9\u6211\u4EEC\u5B9A\u4E49\u4E00\u4E2A\u7B80\u5355\u7684\u51FD\u6570\u6765\u8BA1\u7B97\u6BCF\u6761\u8BC4\u8BBA\u4E2D\u7684\u5355\u8BCD\u6570\uFF1A"),Ov.forEach(e),jp=d(t),_(De.$$.fragment,t),Ep=d(t),B=r(t,"P",{});var ft=o(B);Um=n(ft,"\u4E0E\u6211\u4EEC\u7684 "),Zl=r(ft,"CODE",{});var Sv=o(Zl);Vm=n(Sv,"lowercase_condition()"),Sv.forEach(e),Ym=n(ft," \u51FD\u6570\u4E0D\u540C\uFF0C"),tr=r(ft,"CODE",{});var Rv=o(tr);Wm=n(Rv,"compute_review_length()"),Rv.forEach(e),Xm=n(ft," \u8FD4\u56DE\u4E00\u4E2A\u5B57\u5178\uFF0C\u5176\u952E\u4E0E\u6570\u636E\u96C6\u4E2D\u7684\u5217\u540D\u4E4B\u4E00\u4E0D\u5BF9\u5E94\u3002 \u5728\u8FD9\u79CD\u60C5\u51B5\u4E0B\uFF0C\u5F53 "),sr=r(ft,"CODE",{});var Pv=o(sr);Km=n(Pv,"compute_review_length()"),Pv.forEach(e),Qm=n(ft," \u4F20\u9012\u7ED9 "),er=r(ft,"CODE",{});var Gv=o(er);Zm=n(Gv,"Dataset.map()"),Gv.forEach(e),t_=n(ft," \u65F6\uFF0C\u5B83\u5C06\u5E94\u7528\u4E8E\u6570\u636E\u96C6\u4E2D\u7684\u6240\u6709\u884C\u4EE5\u521B\u5EFA\u65B0\u7684 "),ar=r(ft,"CODE",{});var Cv=o(ar);s_=n(Cv,"review_length"),Cv.forEach(e),e_=n(ft," \u5217\uFF1A"),ft.forEach(e),bp=d(t),_(ke.$$.fragment,t),xp=d(t),_(ye.$$.fragment,t),Tp=d(t),Ot=r(t,"P",{});var Qn=o(Ot);a_=n(Qn,"\u6B63\u5982\u9884\u671F\u7684\u90A3\u6837\uFF0C\u6211\u4EEC\u53EF\u4EE5\u770B\u5230\u4E00\u4E2A "),nr=r(Qn,"STRONG",{});var zv=o(nr);n_=n(zv,"review_length"),zv.forEach(e),l_=n(Qn," \u5217\u5DF2\u6DFB\u52A0\u5230\u6211\u4EEC\u7684\u8BAD\u7EC3\u96C6\u4E2D\u3002\u6211\u4EEC\u53EF\u4EE5\u4F7F\u7528 "),lr=r(Qn,"STRONG",{});var Av=o(lr);r_=n(Av,"Dataset.sort()"),Av.forEach(e),o_=n(Qn,"\u5BF9\u8FD9\u4E2A\u65B0\u5217\u8FDB\u884C\u6392\u5E8F\uFF0C\u7136\u540E\u67E5\u770B\u6781\u7AEF\u957F\u5EA6\u7684\u8BC4\u8BBA\u7684\u6837\u5B50\uFF1A"),Qn.forEach(e),Dp=d(t),_(qe.$$.fragment,t),kp=d(t),_(Ne.$$.fragment,t),yp=d(t),La=r(t,"P",{});var Iv=o(La);i_=n(Iv,"\u6B63\u5982\u6211\u4EEC\u6240\u731C\u60F3\u7684\u90A3\u6837\uFF0C\u4E00\u4E9B\u8BC4\u8BBA\u53EA\u5305\u542B\u4E00\u4E2A\u8BCD\uFF0C\u867D\u7136\u8FD9\u5BF9\u4E8E\u60C5\u611F\u5206\u6790\u6765\u8BF4\u53EF\u80FD\u6CA1\u95EE\u9898\uFF0C\u4F46\u5982\u679C\u6211\u4EEC\u60F3\u8981\u9884\u6D4B\u75C5\u60C5\uFF0C\u8FD9\u4E9B\u8BC4\u8BBA\u53EF\u80FD\u5E76\u4E0D\u9002\u5408\u3002"),Iv.forEach(e),qp=d(t),_(hs.$$.fragment,t),Np=d(t),St=r(t,"P",{});var Zn=o(St);p_=n(Zn,"\u8BA9\u6211\u4EEC\u4F7F\u7528 "),rr=r(Zn,"STRONG",{});var Hv=o(rr);f_=n(Hv,"Dataset.filter()"),Hv.forEach(e),d_=n(Zn," \u529F\u80FD\u6765\u5220\u9664\u5305\u542B\u5C11\u4E8E 30 \u4E2A\u5355\u8BCD\u7684\u8BC4\u8BBA\u3002\u4E0E\u6211\u4EEC\u5BF9 "),or=r(Zn,"STRONG",{});var Fv=o(or);u_=n(Fv,"condition"),Fv.forEach(e),m_=n(Zn," \u5217\u7684\u5904\u7406\u76F8\u4F3C\uFF0C\u6211\u4EEC\u53EF\u4EE5\u901A\u8FC7\u9009\u53D6\u8BC4\u8BBA\u7684\u957F\u5EA6\u9AD8\u4E8E\u6B64\u9608\u503C\u6765\u8FC7\u6EE4\u6389\u975E\u5E38\u77ED\u7684\u8BC4\u8BBA\uFF1A"),Zn.forEach(e),Op=d(t),_(Oe.$$.fragment,t),Sp=d(t),_(Se.$$.fragment,t),Rp=d(t),Ma=r(t,"P",{});var Lv=o(Ma);__=n(Lv,"\u5982\u60A8\u6240\u89C1\uFF0C\u8FD9\u5DF2\u7ECF\u4ECE\u6211\u4EEC\u7684\u539F\u59CB\u8BAD\u7EC3\u548C\u6D4B\u8BD5\u96C6\u4E2D\u5220\u9664\u4E86\u5927\u7EA6 15% \u7684\u8BC4\u8BBA\u3002"),Lv.forEach(e),Pp=d(t),_(cs.$$.fragment,t),Gp=d(t),gs=r(t,"P",{});var Nd=o(gs);h_=n(Nd,"\u6211\u4EEC\u9700\u8981\u5904\u7406\u7684\u6700\u540E\u4E00\u4EF6\u4E8B\u662F\u8BC4\u8BBA\u4E2D\u662F\u5426\u5B58\u5728 HTML \u5B57\u7B26\u4EE3\u7801\u3002\u6211\u4EEC\u53EF\u4EE5\u4F7F\u7528 Python \u7684"),ir=r(Nd,"STRONG",{});var Mv=o(ir);c_=n(Mv,"html"),Mv.forEach(e),g_=n(Nd,"\u6A21\u5757\u53D6\u6D88\u8FD9\u4E9B\u5B57\u7B26\u7684\u8F6C\u4E49\uFF0C\u5982\u4E0B\u6240\u793A\uFF1A"),Nd.forEach(e),Cp=d(t),_(Re.$$.fragment,t),zp=d(t),_(Pe.$$.fragment,t),Ap=d(t),$s=r(t,"P",{});var Od=o($s);$_=n(Od,"\u6211\u4EEC\u5C06\u4F7F\u7528 "),pr=r(Od,"STRONG",{});var Bv=o(pr);v_=n(Bv,"Dataset.map()"),Bv.forEach(e),w_=n(Od," \u5BF9\u6211\u4EEC\u8BED\u6599\u5E93\u4E2D\u7684\u6240\u6709 HTML \u5B57\u7B26\u8FDB\u884C\u8F6C\u4E49\uFF1A"),Od.forEach(e),Ip=d(t),_(Ge.$$.fragment,t),Hp=d(t),vs=r(t,"P",{});var Sd=o(vs);j_=n(Sd,"\u5982\u60A8\u6240\u89C1\uFF0C "),fr=r(Sd,"STRONG",{});var Jv=o(fr);E_=n(Jv,"Dataset.map()"),Jv.forEach(e),b_=n(Sd," \u65B9\u6CD5\u5BF9\u4E8E\u5904\u7406\u6570\u636E\u975E\u5E38\u6709\u7528\u2014\u2014\u5728\u793A\u4F8B\u4E2D\u4EC5\u4EC5\u662F\u6D45\u5C1D\u8F84\u6B62\u5C31\u6709\u5F88\u5927\u7684\u6536\u83B7\uFF01"),Sd.forEach(e),Fp=d(t),Wt=r(t,"H2",{class:!0});var Rd=o(Wt);ws=r(Rd,"A",{id:!0,class:!0,href:!0});var Uv=o(ws);dr=r(Uv,"SPAN",{});var Vv=o(dr);_(Ce.$$.fragment,Vv),Vv.forEach(e),Uv.forEach(e),x_=d(Rd),ur=r(Rd,"SPAN",{});var Yv=o(ur);T_=n(Yv,"map() \u65B9\u6CD5\u7684\u8D85\u7EA7\u52A0\u901F"),Yv.forEach(e),Rd.forEach(e),Lp=d(t),ht=r(t,"P",{});var ya=o(ht);mr=r(ya,"STRONG",{});var Wv=o(mr);D_=n(Wv,"Dataset.map()"),Wv.forEach(e),k_=n(ya," \u65B9\u6CD5\u6709\u4E00\u4E2A "),_r=r(ya,"STRONG",{});var Xv=o(_r);y_=n(Xv,"batched"),Xv.forEach(e),q_=n(ya," \u53C2\u6570\uFF0C\u5982\u679C\u8BBE\u7F6E\u4E3A "),hr=r(ya,"STRONG",{});var Kv=o(hr);N_=n(Kv,"True"),Kv.forEach(e),O_=n(ya," , map \u51FD\u6570\u5C06\u4F1A\u5206\u6279\u6267\u884C\u6240\u9700\u8981\u8FDB\u884C\u7684\u64CD\u4F5C\uFF08\u6279\u91CF\u5927\u5C0F\u662F\u53EF\u914D\u7F6E\u7684\uFF0C\u4F46\u9ED8\u8BA4\u4E3A 1,000\uFF09\u3002\u4F8B\u5982\uFF0C\u4E4B\u524D\u5BF9\u6240\u6709 HTML \u8FDB\u884C\u8F6C\u4E49\u7684 map \u51FD\u6570\u8FD0\u884C\u9700\u8981\u4E00\u4E9B\u65F6\u95F4\uFF08\u60A8\u53EF\u4EE5\u4ECE\u8FDB\u5EA6\u6761\u4E2D\u8BFB\u53D6\u6240\u7528\u65F6\u95F4\uFF09\u3002\u6211\u4EEC\u53EF\u4EE5\u901A\u8FC7\u4F7F\u7528\u5217\u8868\u63A8\u5BFC\u540C\u65F6\u5904\u7406\u591A\u4E2A\u5143\u7D20\u6765\u52A0\u5FEB\u901F\u5EA6\u3002"),ya.forEach(e),Mp=d(t),K=r(t,"P",{});var Mt=o(K);S_=n(Mt,"\u5F53\u60A8\u5728\u4F7F\u7528 "),cr=r(Mt,"STRONG",{});var Qv=o(cr);R_=n(Qv,"Dataset.map()"),Qv.forEach(e),P_=n(Mt,"\u51FD\u6570\u65F6\u6307\u5B9A "),gr=r(Mt,"STRONG",{});var Zv=o(gr);G_=n(Zv,"batched=True"),Zv.forEach(e),C_=n(Mt,"\u3002\u8BE5\u51FD\u6570\u4F1A\u63A5\u6536\u4E00\u4E2A\u5305\u542B\u6570\u636E\u96C6\u5B57\u6BB5\u7684\u5B57\u5178\uFF0C\u6BCF\u4E2A\u503C\u90FD\u662F\u4E00\u4E2A\u5217\u8868\uFF0C\u800C\u4E0D\u4EC5\u4EC5\u662F\u5355\u4E2A\u503C\u3002"),$r=r(Mt,"STRONG",{});var t7=o($r);z_=n(t7,"Dataset.map()"),t7.forEach(e),A_=n(Mt," \u7684\u8FD4\u56DE\u503C\u5E94\u8BE5\u662F\u76F8\u540C\u7684\uFF1A\u4E00\u4E2A\u5305\u542B\u6211\u4EEC\u60F3\u8981\u66F4\u65B0\u6216\u6DFB\u52A0\u5230\u6570\u636E\u96C6\u4E2D\u7684\u5B57\u6BB5\u7684\u5B57\u5178\uFF0C\u5B57\u5178\u7684\u952E\u662F\u8981\u6DFB\u52A0\u7684\u5B57\u6BB5\uFF0C\u5B57\u5178\u7684\u503C\u662F\u7ED3\u679C\u7684\u5217\u8868\u3002\u4F8B\u5982\uFF0C\u8FD9\u662F\u4F7F\u7528 "),vr=r(Mt,"STRONG",{});var s7=o(vr);I_=n(s7,"batched=True"),s7.forEach(e),H_=n(Mt,"\u5BF9\u6240\u6709 HTML \u5B57\u7B26\u8FDB\u884C\u8F6C\u4E49\u7684\u65B9\u6CD5 \uFF1A"),Mt.forEach(e),Bp=d(t),_(ze.$$.fragment,t),Jp=d(t),Rt=r(t,"P",{});var tl=o(Rt);F_=n(tl,"\u5982\u679C\u60A8\u5728\u7B14\u8BB0\u672C\u4E2D\u8FD0\u884C\u6B64\u4EE3\u7801\uFF0C\u60A8\u4F1A\u770B\u5230\u6B64\u547D\u4EE4\u7684\u6267\u884C\u901F\u5EA6\u6BD4\u524D\u4E00\u4E2A\u547D\u4EE4\u5FEB\u5F97\u591A\u3002\u8FD9\u4E0D\u662F\u56E0\u4E3A\u6211\u4EEC\u7684\u8BC4\u8BBA\u5DF2\u7ECF\u662F\u5904\u7406\u8FC7\u7684\u2014\u2014\u5982\u679C\u4F60\u91CD\u65B0\u6267\u884C\u4E0A\u4E00\u8282\u7684\u6307\u4EE4\uFF08\u6CA1\u6709 "),wr=r(tl,"STRONG",{});var e7=o(wr);L_=n(e7,"batched=True"),e7.forEach(e),M_=n(tl," )\uFF0C\u5B83\u5C06\u82B1\u8D39\u4E0E\u4EE5\u524D\u76F8\u540C\u7684\u65F6\u95F4\u3002\u8FD9\u662F\u56E0\u4E3A\u5217\u8868\u63A8\u5BFC\u5F0F\u901A\u5E38\u6BD4\u5728\u540C\u4E00\u4EE3\u7801\u4E2D\u7528 "),jr=r(tl,"STRONG",{});var a7=o(jr);B_=n(a7,"for"),a7.forEach(e),J_=n(tl," \u5FAA\u73AF\u6267\u884C\u76F8\u540C\u7684\u4EE3\u7801\u66F4\u5FEB\uFF0C\u5E76\u4E14\u6211\u4EEC\u8FD8\u901A\u8FC7\u540C\u65F6\u8BBF\u95EE\u591A\u4E2A\u5143\u7D20\u800C\u4E0D\u662F\u4E00\u4E2A\u4E00\u4E2A\u6765\u5904\u7406\u6765\u63D0\u9AD8\u5904\u7406\u7684\u901F\u5EA6\u3002"),tl.forEach(e),Up=d(t),lt=r(t,"P",{});var Us=o(lt);U_=n(Us,"\u5728"),Ba=r(Us,"A",{href:!0});var n7=o(Ba);V_=n(n7,"\u7B2C\u516D\u7AE0"),n7.forEach(e),Y_=n(Us,"\u6211\u4EEC\u5C06\u9047\u5230\u7684\u201C\u5FEB\u901F\u201D\u6807\u8BB0\u5668\uFF0C\u5B83\u53EF\u4EE5\u5FEB\u901F\u6807\u8BB0\u5927\u6587\u672C\u5217\u8868\u3002\u4F7F\u7528 "),Er=r(Us,"STRONG",{});var l7=o(Er);W_=n(l7,"Dataset.map()"),l7.forEach(e),X_=n(Us," \u548C "),br=r(Us,"STRONG",{});var r7=o(br);K_=n(r7,"batched=True"),r7.forEach(e),Q_=n(Us," \u662F\u52A0\u901F\u7684\u5173\u952E\u3002\u4F8B\u5982\uFF0C\u8981\u4F7F\u7528\u5FEB\u901F\u6807\u8BB0\u5668\u6807\u8BB0\u6240\u6709\u836F\u7269\u8BC4\u8BBA\uFF0C\u6211\u4EEC\u53EF\u4EE5\u4F7F\u7528\u8FD9\u6837\u7684\u51FD\u6570\uFF1A"),Us.forEach(e),Vp=d(t),_(Ae.$$.fragment,t),Yp=d(t),rt=r(t,"P",{});var Vs=o(rt);Z_=n(Vs,"\u6B63\u5982\u4F60\u5728"),Ja=r(Vs,"A",{href:!0});var o7=o(Ja);th=n(o7,"\u7B2C\u4E09\u7AE0"),o7.forEach(e),sh=n(Vs,"\u6240\u770B\u5230\u7684\uFF0C\u6211\u4EEC\u539F\u672C\u5C31\u53EF\u4EE5\u5C06\u4E00\u4E2A\u6216\u591A\u4E2A\u793A\u4F8B\u4F20\u9012\u7ED9\u5206\u8BCD\u5668\uFF0C\u56E0\u6B64\u5728"),xr=r(Vs,"STRONG",{});var i7=o(xr);eh=n(i7,"batched=True"),i7.forEach(e),ah=n(Vs,"\u662F\u4E00\u4E2A\u975E\u5FC5\u987B\u7684\u9009\u9879.\u8BA9\u6211\u4EEC\u501F\u6B64\u673A\u4F1A\u6BD4\u8F83\u4E0D\u540C\u9009\u9879\u7684\u6027\u80FD\u3002\u5728\u7B14\u8BB0\u672C\u4E2D\uFF0C\u60A8\u53EF\u4EE5\u5728\u60A8\u8981\u6D4B\u91CF\u7684\u4EE3\u7801\u884C\u4E4B\u524D\u6DFB\u52A0 "),Tr=r(Vs,"STRONG",{});var p7=o(Tr);nh=n(p7,"%time"),p7.forEach(e),lh=n(Vs,"\u6765\u6D4B\u8BD5\u6539\u884C\u8FD0\u884C\u6240\u6D88\u8017\u7684\u65F6\u95F4\uFF1A"),Vs.forEach(e),Wp=d(t),_(Ie.$$.fragment,t),Xp=d(t),js=r(t,"P",{});var Pd=o(js);rh=n(Pd,"\u60A8\u8FD8\u53EF\u4EE5\u901A\u8FC7\u5C06\u6574\u4E2A\u5355\u5143\u683C\u8BA1\u65F6 "),Dr=r(Pd,"STRONG",{});var f7=o(Dr);oh=n(f7,"%%time"),f7.forEach(e),ih=n(Pd," \u5728\u5355\u5143\u683C\u7684\u5F00\u5934\u3002\u5728\u6211\u4EEC\u6267\u884C\u6B64\u64CD\u4F5C\u7684\u786C\u4EF6\u4E0A\uFF0C\u8BE5\u6307\u4EE4\u663E\u793A 10.8 \u79D2\uFF08\u8FD9\u662F\u5199\u5728\u201CWall time\u201D\u4E4B\u540E\u7684\u6570\u5B57\uFF09\u3002"),Pd.forEach(e),Kp=d(t),_(Es.$$.fragment,t),Qp=d(t),Ua=r(t,"P",{});var d7=o(Ua);ph=n(d7,"\u4EE5\u4E0B\u662F\u6211\u4EEC\u5728\u4F7F\u7528\u548C\u4E0D\u4F7F\u7528\u6279\u5904\u7406\u65F6\u4F7F\u7528\u5FEB\u901F\u548C\u6162\u901F\u5206\u8BCD\u5668\u83B7\u5F97\u7684\u7ED3\u679C\uFF1A"),d7.forEach(e),Zp=d(t),bs=r(t,"TABLE",{});var Gd=o(bs);kr=r(Gd,"THEAD",{});var u7=o(kr);Xt=r(u7,"TR",{});var sl=o(Xt);Va=r(sl,"TH",{align:!0});var m7=o(Va);fh=n(m7,"Options"),m7.forEach(e),dh=d(sl),Ya=r(sl,"TH",{align:!0});var _7=o(Ya);uh=n(_7,"Fast tokenizer"),_7.forEach(e),mh=d(sl),Wa=r(sl,"TH",{align:!0});var h7=o(Wa);_h=n(h7,"Slow tokenizer"),h7.forEach(e),sl.forEach(e),u7.forEach(e),hh=d(Gd),He=r(Gd,"TBODY",{});var Cd=o(He);Kt=r(Cd,"TR",{});var el=o(Kt);Xa=r(el,"TD",{align:!0});var c7=o(Xa);yr=r(c7,"CODE",{});var g7=o(yr);ch=n(g7,"batched=True"),g7.forEach(e),c7.forEach(e),gh=d(el),Ka=r(el,"TD",{align:!0});var $7=o(Ka);$h=n($7,"10.8s"),$7.forEach(e),vh=d(el),Qa=r(el,"TD",{align:!0});var v7=o(Qa);wh=n(v7,"4min41s"),v7.forEach(e),el.forEach(e),jh=d(Cd),Qt=r(Cd,"TR",{});var al=o(Qt);Za=r(al,"TD",{align:!0});var w7=o(Za);qr=r(w7,"CODE",{});var j7=o(qr);Eh=n(j7,"batched=False"),j7.forEach(e),w7.forEach(e),bh=d(al),tn=r(al,"TD",{align:!0});var E7=o(tn);xh=n(E7,"59.2s"),E7.forEach(e),Th=d(al),sn=r(al,"TD",{align:!0});var b7=o(sn);Dh=n(b7,"5min3s"),b7.forEach(e),al.forEach(e),Cd.forEach(e),Gd.forEach(e),tf=d(t),ot=r(t,"P",{});var Ys=o(ot);kh=n(Ys,"\u8FD9\u610F\u5473\u7740\u4F7F\u7528\u5E26\u6709 "),Nr=r(Ys,"STRONG",{});var x7=o(Nr);yh=n(x7,"batched=True"),x7.forEach(e),qh=n(Ys," \u9009\u9879\u6BD4\u6CA1\u6709\u6279\u5904\u7406\u7684\u6162\u9009\u9879\u5FEB 30 \u500D\u2014\u2014\u8FD9\u771F\u662F\u592A\u68D2\u4E86\uFF01\u8FD9\u5C31\u662F\u4E3A\u4EC0\u4E48"),Or=r(Ys,"STRONG",{});var T7=o(Or);Nh=n(T7,"AutoTokenizer"),T7.forEach(e),Oh=n(Ys," \u7684\u9ED8\u8BA4\u8BBE\u7F6E\u662F"),Sr=r(Ys,"STRONG",{});var D7=o(Sr);Sh=n(D7,"use_fast=True"),D7.forEach(e),Rh=n(Ys,"\u7684\u4E3B\u8981\u539F\u56E0 \uFF08\u4EE5\u53CA\u4E3A\u4EC0\u4E48\u5B83\u4EEC\u88AB\u79F0\u4E3A\u201C\u5FEB\u901F\u201D\uFF09\u3002\u4ED6\u4EEC\u80FD\u591F\u5B9E\u73B0\u8FD9\u6837\u7684\u52A0\u901F\uFF0C\u56E0\u4E3A\u5728\u5E95\u5C42\u7684\u6807\u8BB0\u5316\u4EE3\u7801\u662F\u5728 Rust \u4E2D\u6267\u884C\u7684\uFF0CRust \u662F\u4E00\u79CD\u53EF\u4EE5\u8F7B\u677E\u5E76\u884C\u5316\u6267\u884C\u7684\u8BED\u8A00\u3002"),Ys.forEach(e),sf=d(t),en=r(t,"P",{});var k7=o(en);Ph=n(k7,"\u5E76\u884C\u5316\u4E5F\u662F\u5FEB\u901F\u6807\u8BB0\u5668\u901A\u8FC7\u6279\u5904\u7406\u5B9E\u73B0\u8FD1 6 \u500D\u52A0\u901F\u7684\u539F\u56E0\uFF1A\u5355\u4E2A\u6807\u8BB0\u5316\u64CD\u4F5C\u662F\u4E0D\u80FD\u5E76\u884C\u7684\uFF0C\u4F46\u662F\u5F53\u60A8\u60F3\u540C\u65F6\u6807\u8BB0\u5927\u91CF\u6587\u672C\u65F6\uFF0C\u60A8\u53EF\u4EE5\u5C06\u6267\u884C\u62C6\u5206\u4E3A\u591A\u4E2A\u8FDB\u7A0B\uFF0C\u6BCF\u4E2A\u8FDB\u7A0B\u90FD\u5BF9\u81EA\u5DF1\u7684\u6587\u672C\u8D1F\u8D23\u3002"),k7.forEach(e),ef=d(t),ct=r(t,"P",{});var qa=o(ct);Rr=r(qa,"STRONG",{});var y7=o(Rr);Gh=n(y7,"Dataset.map()"),y7.forEach(e),Ch=n(qa," \u4E5F\u6709\u4E00\u4E9B\u81EA\u5DF1\u7684\u5E76\u884C\u5316\u80FD\u529B\u3002\u7531\u4E8E\u5B83\u4EEC\u4E0D\u53D7 Rust \u7684\u652F\u6301\uFF0C\u56E0\u6B64\u6162\u901F\u5206\u8BCD\u5668\u7684\u901F\u5EA6\u8D76\u4E0D\u4E0A\u5FEB\u901F\u5206\u8BCD\u5668\uFF0C\u4F46\u5B83\u4EEC\u4ECD\u7136\u4F1A\u66F4\u5FEB\u4E00\u4E9B\uFF08\u5C24\u5176\u662F\u5F53\u60A8\u4F7F\u7528\u6CA1\u6709\u5FEB\u901F\u7248\u672C\u7684\u5206\u8BCD\u5668\u65F6\uFF09\u3002\u8981\u542F\u7528\u591A\u5904\u7406\uFF0C\u8BF7\u5728"),Pr=r(qa,"STRONG",{});var q7=o(Pr);zh=n(q7,"Dataset.map()"),q7.forEach(e),Ah=n(qa,"\u65F6\u4F7F\u7528 "),Gr=r(qa,"STRONG",{});var N7=o(Gr);Ih=n(N7,"num_proc"),N7.forEach(e),Hh=n(qa," \u53C2\u6570\u5E76\u6307\u5B9A\u8981\u5728\u8C03\u7528\u4E2D\u4F7F\u7528\u7684\u8FDB\u7A0B\u6570 \uFF1A"),qa.forEach(e),af=d(t),_(Fe.$$.fragment,t),nf=d(t),an=r(t,"P",{});var O7=o(an);Fh=n(O7,"\u60A8\u53EF\u4EE5\u5BF9\u5904\u7406\u7684\u65F6\u95F4\u8FDB\u884C\u4E00\u4E9B\u8BD5\u9A8C\uFF0C\u4EE5\u786E\u5B9A\u8981\u4F7F\u7528\u7684\u6700\u4F73\u8FDB\u7A0B\u6570\uFF1B\u5728\u6211\u4EEC\u7684\u4F8B\u5B50\u4E2D\uFF0C8 \u4F3C\u4E4E\u4EA7\u751F\u4E86\u6700\u597D\u7684\u901F\u5EA6\u589E\u76CA\u3002\u4EE5\u4E0B\u662F\u6211\u4EEC\u5728\u4F7F\u7528\u548C\u4E0D\u4F7F\u7528\u591A\u5904\u7406\u65F6\u6240\u9700\u8981\u7684\u65F6\u95F4\uFF1A"),O7.forEach(e),lf=d(t),xs=r(t,"TABLE",{});var zd=o(xs);Cr=r(zd,"THEAD",{});var S7=o(Cr);Zt=r(S7,"TR",{});var nl=o(Zt);nn=r(nl,"TH",{align:!0});var R7=o(nn);Lh=n(R7,"Options"),R7.forEach(e),Mh=d(nl),ln=r(nl,"TH",{align:!0});var P7=o(ln);Bh=n(P7,"Fast tokenizer"),P7.forEach(e),Jh=d(nl),rn=r(nl,"TH",{align:!0});var G7=o(rn);Uh=n(G7,"Slow tokenizer"),G7.forEach(e),nl.forEach(e),S7.forEach(e),Vh=d(zd),gt=r(zd,"TBODY",{});var Ws=o(gt);ts=r(Ws,"TR",{});var ll=o(ts);on=r(ll,"TD",{align:!0});var C7=o(on);zr=r(C7,"CODE",{});var z7=o(zr);Yh=n(z7,"batched=True"),z7.forEach(e),C7.forEach(e),Wh=d(ll),pn=r(ll,"TD",{align:!0});var A7=o(pn);Xh=n(A7,"10.8s"),A7.forEach(e),Kh=d(ll),fn=r(ll,"TD",{align:!0});var I7=o(fn);Qh=n(I7,"4min41s"),I7.forEach(e),ll.forEach(e),Zh=d(Ws),ss=r(Ws,"TR",{});var rl=o(ss);dn=r(rl,"TD",{align:!0});var H7=o(dn);Ar=r(H7,"CODE",{});var F7=o(Ar);tc=n(F7,"batched=False"),F7.forEach(e),H7.forEach(e),sc=d(rl),un=r(rl,"TD",{align:!0});var L7=o(un);ec=n(L7,"59.2s"),L7.forEach(e),ac=d(rl),mn=r(rl,"TD",{align:!0});var M7=o(mn);nc=n(M7,"5min3s"),M7.forEach(e),rl.forEach(e),lc=d(Ws),es=r(Ws,"TR",{});var ol=o(es);Ts=r(ol,"TD",{align:!0});var Ad=o(Ts);Ir=r(Ad,"CODE",{});var B7=o(Ir);rc=n(B7,"batched=True"),B7.forEach(e),oc=n(Ad,", "),Hr=r(Ad,"CODE",{});var J7=o(Hr);ic=n(J7,"num_proc=8"),J7.forEach(e),Ad.forEach(e),pc=d(ol),_n=r(ol,"TD",{align:!0});var U7=o(_n);fc=n(U7,"6.52s"),U7.forEach(e),dc=d(ol),hn=r(ol,"TD",{align:!0});var V7=o(hn);uc=n(V7,"41.3s"),V7.forEach(e),ol.forEach(e),mc=d(Ws),as=r(Ws,"TR",{});var il=o(as);Ds=r(il,"TD",{align:!0});var Id=o(Ds);Fr=r(Id,"CODE",{});var Y7=o(Fr);_c=n(Y7,"batched=False"),Y7.forEach(e),hc=n(Id,", "),Lr=r(Id,"CODE",{});var W7=o(Lr);cc=n(W7,"num_proc=8"),W7.forEach(e),Id.forEach(e),gc=d(il),cn=r(il,"TD",{align:!0});var X7=o(cn);$c=n(X7,"9.49s"),X7.forEach(e),vc=d(il),gn=r(il,"TD",{align:!0});var K7=o(gn);wc=n(K7,"45.2s"),K7.forEach(e),il.forEach(e),Ws.forEach(e),zd.forEach(e),rf=d(t),Q=r(t,"P",{});var Bt=o(Q);jc=n(Bt,"\u5BF9\u4E8E\u6162\u901F\u5206\u8BCD\u5668\u6765\u8BF4\uFF0C\u8FD9\u4E9B\u7ED3\u679C\u8981\u5408\u7406\u5F97\u591A\uFF0C\u4F46\u5FEB\u901F\u5206\u8BCD\u5668\u7684\u6027\u80FD\u4E5F\u5F97\u5230\u4E86\u663E\u7740\u63D0\u9AD8\u3002\u4F46\u662F\u8BF7\u6CE8\u610F\uFF0C\u60C5\u51B5\u5E76\u975E\u603B\u662F\u5982\u6B64\u2014\u2014\u9664\u4E86 "),Mr=r(Bt,"STRONG",{});var Q7=o(Mr);Ec=n(Q7,"num_proc=8"),Q7.forEach(e),bc=n(Bt,"\uFF0C\u6211\u4EEC\u7684\u6D4B\u8BD5\u8868\u660E\uFF0C\u4F7F\u7528"),Br=r(Bt,"STRONG",{});var Z7=o(Br);xc=n(Z7,"batched=True"),Z7.forEach(e),Tc=n(Bt,"\u800C\u4E0D\u5E26\u6709"),Jr=r(Bt,"STRONG",{});var t3=o(Jr);Dc=n(t3,"num_proc"),t3.forEach(e),kc=n(Bt,"\u53C2\u6570\u7684\u9009\u9879\u5904\u7406\u8D77\u6765\u66F4\u5FEB\u3002\u901A\u5E38\uFF0C\u6211\u4EEC\u4E0D\u5EFA\u8BAE\u5C06 Python \u591A\u7EBF\u7A0B\u5904\u7406\u7528\u4E8E\u5177\u6709"),Ur=r(Bt,"STRONG",{});var s3=o(Ur);yc=n(s3,"batched=True"),s3.forEach(e),qc=n(Bt,"\u529F\u80FD\u7684\u5FEB\u901F\u6807\u8BB0\u5668  ."),Bt.forEach(e),of=d(t),_(ks.$$.fragment,t),pf=d(t),it=r(t,"P",{});var Xs=o(it);Nc=n(Xs,"\u5C06\u6240\u6709\u8FD9\u4E9B\u529F\u80FD\u6D53\u7F29\u5230\u4E00\u4E2A\u65B9\u6CD5\u4E2D\u5DF2\u7ECF\u975E\u5E38\u4E86\u4E0D\u8D77\uFF0C\u4F46\u8FD8\u6709\u66F4\u591A\uFF01\u4F7F\u7528 "),Vr=r(Xs,"STRONG",{});var e3=o(Vr);Oc=n(e3,"Dataset.map()"),e3.forEach(e),Sc=n(Xs," \u548C "),Yr=r(Xs,"STRONG",{});var a3=o(Yr);Rc=n(a3,"batched=True"),a3.forEach(e),Pc=n(Xs," \u60A8\u53EF\u4EE5\u66F4\u6539\u6570\u636E\u96C6\u4E2D\u7684\u5143\u7D20\u6570\u91CF\u3002\u5F53\u4F60\u60F3\u4ECE\u4E00\u4E2A\u4F8B\u5B50\u4E2D\u521B\u5EFA\u51E0\u4E2A\u8BAD\u7EC3\u7279\u5F81\u65F6\uFF0C\u8FD9\u662F\u975E\u5E38\u6709\u7528\u7684\u3002\u6211\u4EEC\u5C06\u5728"),$n=r(Xs,"A",{href:!0});var n3=o($n);Gc=n(n3,"\u7B2C\u4E03\u7AE0"),n3.forEach(e),Cc=n(Xs,".\u4E2D\u8FDB\u884C\u7684\u51E0\u4E2ANLP\u4EFB\u52A1\u7684\u9884\u5904\u7406\u4E2D\u4F7F\u7528\u5230\u8FD9\u4E2A\u529F\u80FD\uFF0C\u5B83\u975E\u5E38\u4FBF\u5229\u3002"),Xs.forEach(e),ff=d(t),_(ys.$$.fragment,t),df=d(t),qs=r(t,"P",{});var Hd=o(qs);zc=n(Hd,"\u8BA9\u6211\u4EEC\u6765\u770B\u770B\u5B83\u662F\u5982\u4F55\u5DE5\u4F5C\u7684\uFF01\u5728\u8FD9\u91CC\uFF0C\u6211\u4EEC\u5C06\u6807\u8BB0\u5316\u6211\u4EEC\u7684\u793A\u4F8B\u5E76\u5C06\u6700\u5927\u622A\u65AD\u957F\u5EA6\u8BBE\u7F6E128\uFF0C\u4F46\u6211\u4EEC\u5C06\u8981\u6C42\u6807\u8BB0\u5668\u8FD4\u56DE\u5168\u90E8\u6587\u672C\u5757\uFF0C\u800C\u4E0D\u4EC5\u4EC5\u662F\u7B2C\u4E00\u4E2A\u3002\u8FD9\u53EF\u4EE5\u7528 "),Wr=r(Hd,"STRONG",{});var l3=o(Wr);Ac=n(l3,"return_overflowing_tokens=True"),l3.forEach(e),Ic=n(Hd," \uFF1A"),Hd.forEach(e),uf=d(t),_(Le.$$.fragment,t),mf=d(t),Ns=r(t,"P",{});var Fd=o(Ns);Hc=n(Fd,"\u5728\u4F7F\u7528"),Xr=r(Fd,"STRONG",{});var r3=o(Xr);Fc=n(r3,"Dataset.map()"),r3.forEach(e),Lc=n(Fd," \u6B63\u5F0F\u5728\u6574\u4E2A\u6570\u636E\u96C6\u4E0A\u5F00\u59CB\u5904\u7406\u4E4B\u524D\u8BA9\u6211\u4EEC\u5148\u5728\u4E00\u4E2A\u4F8B\u5B50\u4E0A\u6D4B\u8BD5\u4E00\u4E0B\uFF1A"),Fd.forEach(e),_f=d(t),_(Me.$$.fragment,t),hf=d(t),_(Be.$$.fragment,t),cf=d(t),vn=r(t,"P",{});var o3=o(vn);Mc=n(o3,"\u77A7\uFF01\u6211\u4EEC\u5728\u8BAD\u7EC3\u96C6\u4E2D\u7684\u7B2C\u4E00\u4E2A\u793A\u4F8B\u53D8\u6210\u4E86\u4E24\u4E2A\u7279\u5F81\uFF0C\u56E0\u4E3A\u5B83\u88AB\u6807\u8BB0\u4E3A\u8D85\u8FC7\u6211\u4EEC\u6307\u5B9A\u7684\u6700\u5927\u622A\u65AD\u957F\u5EA6\uFF0C\u56E0\u6B64\u7ED3\u679C\u88AB\u622A\u6210\u4E86\u4E24\u6BB5\uFF1A\u7B2C\u4E00\u6BB5\u957F\u5EA6\u4E3A 128 \uFF0C\u7B2C\u4E8C\u6BB5\u957F\u5EA6\u4E3A 49 \u3002\u73B0\u5728\u8BA9\u6211\u4EEC\u5BF9\u6240\u6709\u5143\u7D20\u6267\u884C\u6B64\u64CD\u4F5C\u6570\u636E\u96C6\uFF01"),o3.forEach(e),gf=d(t),_(Je.$$.fragment,t),$f=d(t),_(Ue.$$.fragment,t),vf=d(t),wn=r(t,"P",{});var i3=o(wn);Bc=n(i3,"\u4E0D\u597D\u4E86\uFF01\u5B83\u6CA1\u6709\u8D77\u4F5C\u7528\uFF01\u4E3A\u4EC0\u4E48\u5462\uFF1F\u67E5\u770B\u9519\u8BEF\u6D88\u606F\u4F1A\u7ED9\u6211\u4EEC\u4E00\u4E2A\u7EBF\u7D22\uFF1A\u5217\u7684\u957F\u5EA6\u4E0D\u5339\u914D\uFF0C\u4E00\u5217\u957F\u5EA6\u4E3A 1,463\uFF0C\u53E6\u4E00\u5217\u957F\u5EA6\u4E3A 1,000\u30021,000\u884C\u7684\u201Dreview\u201D\u7ED9\u51FA\u4E86 1,463 \u884C\u7684\u65B0\u7279\u5F81\uFF0C\u5BFC\u81F4\u548C\u539F\u672C\u76841000\u884C\u6570\u636E\u4E0D\u5339\u914D\u3002"),i3.forEach(e),wf=d(t),Z=r(t,"P",{});var Jt=o(Z);Jc=n(Jt,"\u95EE\u9898\u51FA\u5728\u6211\u4EEC\u8BD5\u56FE\u6DF7\u5408\u4E24\u4E2A\u4E0D\u540C\u5927\u5C0F\u7684\u4E0D\u540C\u6570\u636E\u96C6\uFF1A "),Kr=r(Jt,"STRONG",{});var p3=o(Kr);Uc=n(p3,"drug_dataset"),p3.forEach(e),Vc=n(Jt," \u5217\u5C06\u6709\u4E00\u5B9A\u6570\u91CF\u7684\u5143\u7D20\uFF08\u6211\u4EEC\u9519\u8BEF\u4E2D\u7684 1,000\uFF09\uFF0C\u4F46\u662F\u6211\u4EEC\u6B63\u5728\u6784\u5EFA"),Qr=r(Jt,"STRONG",{});var f3=o(Qr);Yc=n(f3,"tokenized_dataset"),f3.forEach(e),Wc=n(Jt," \u5C06\u6709\u66F4\u591A\u7684\u5143\u7D20\uFF08\u9519\u8BEF\u6D88\u606F\u4E2D\u7684 1,463\uFF09\u3002\u8FD9\u4E0D\u9002\u7528\u4E8E "),Zr=r(Jt,"STRONG",{});var d3=o(Zr);Xc=n(d3,"Dataset"),d3.forEach(e),Kc=n(Jt," \uFF0C\u56E0\u6B64\u6211\u4EEC\u9700\u8981\u4ECE\u65E7\u6570\u636E\u96C6\u4E2D\u5220\u9664\u5217\u6216\u4F7F\u5B83\u4EEC\u7684\u5927\u5C0F\u4E0E\u65B0\u6570\u636E\u96C6\u4E2D\u7684\u5927\u5C0F\u76F8\u540C\u3002\u6211\u4EEC\u53EF\u4EE5\u7528 "),to=r(Jt,"STRONG",{});var u3=o(to);Qc=n(u3,"remove_columns"),u3.forEach(e),Zc=n(Jt," \u53C2\u6570\uFF1A"),Jt.forEach(e),jf=d(t),_(Ve.$$.fragment,t),Ef=d(t),jn=r(t,"P",{});var m3=o(jn);t2=n(m3,"\u73B0\u5728\u8FD9\u4E2A\u8FC7\u7A0B\u6CA1\u6709\u9519\u8BEF\u3002\u6211\u4EEC\u53EF\u4EE5\u901A\u8FC7\u6BD4\u8F83\u957F\u5EA6\u6765\u68C0\u67E5\u65B0\u6570\u636E\u96C6\u7684\u5143\u7D20\u662F\u5426\u6BD4\u539F\u59CB\u6570\u636E\u96C6\u591A\u5F97\u591A\uFF1A"),m3.forEach(e),bf=d(t),_(Ye.$$.fragment,t),xf=d(t),_(We.$$.fragment,t),Tf=d(t),Pt=r(t,"P",{});var pl=o(Pt);s2=n(pl,"\u6211\u4EEC\u63D0\u5230\u6211\u4EEC\u8FD8\u53EF\u4EE5\u901A\u8FC7\u4F7F\u65E7\u5217\u4E0E\u65B0\u5217\u7684\u5927\u5C0F\u76F8\u540C\u6765\u5904\u7406\u957F\u5EA6\u4E0D\u5339\u914D\u7684\u95EE\u9898\u3002\u4E3A\u6B64\uFF0C\u6211\u4EEC\u53EF\u4EE5\u4F7F\u7528 "),so=r(pl,"STRONG",{});var _3=o(so);e2=n(_3,"overflow_to_sample_mapping"),_3.forEach(e),a2=n(pl," \u5B57\u6BB5\uFF0C\u5F53\u6211\u4EEC\u8BBE\u7F6E"),eo=r(pl,"STRONG",{});var h3=o(eo);n2=n(h3,"return_overflowing_tokens=True"),h3.forEach(e),l2=n(pl," .\u5B83\u4E3A\u6211\u4EEC\u63D0\u4F9B\u4E86\u7279\u5F81\u5230\u5B83\u6240\u4EA7\u751F\u7684\u6837\u672C\u7684\u6620\u5C04\u3002\u4F7F\u7528\u8FD9\u4E2A\uFF0C\u6211\u4EEC\u53EF\u4EE5\u5C06\u539F\u59CB\u6570\u636E\u96C6\u4E2D\u7684\u6BCF\u4E2A\u952E\u5173\u8054\u5230\u4E00\u4E2A\u5408\u9002\u5927\u5C0F\u7684\u503C\u5217\u8868\u4E2D\uFF0C\u901A\u8FC7\u904D\u5386\u6240\u6709\u7684\u6570\u636E\u6765\u751F\u6210\u65B0\u7279\u6027:"),pl.forEach(e),Df=d(t),_(Xe.$$.fragment,t),kf=d(t),Os=r(t,"P",{});var Ld=o(Os);r2=n(Ld,"\u6211\u4EEC\u53EF\u4EE5\u4F7F\u7528"),ao=r(Ld,"STRONG",{});var c3=o(ao);o2=n(c3,"Dataset.map()"),c3.forEach(e),i2=n(Ld,"\u6765\u8FDB\u884C\u6279\u5904\u7406\uFF0C\u8FD9\u6837\u65E0\u9700\u6211\u4EEC\u5220\u9664\u65E7\u5217\uFF1A"),Ld.forEach(e),yf=d(t),_(Ke.$$.fragment,t),qf=d(t),_(Qe.$$.fragment,t),Nf=d(t),En=r(t,"P",{});var g3=o(En);p2=n(g3,"\u6211\u4EEC\u83B7\u5F97\u4E86\u4E0E\u4EE5\u524D\u76F8\u540C\u6570\u91CF\u7684\u8BAD\u7EC3\u7279\u5F81\uFF0C\u4F46\u5728\u8FD9\u91CC\u6211\u4EEC\u4FDD\u7559\u4E86\u6240\u6709\u65E7\u5B57\u6BB5\u3002\u5982\u679C\u60A8\u5728\u4F7F\u7528\u6A21\u578B\u8BA1\u7B97\u4E4B\u540E\u9700\u8981\u5B83\u4EEC\u8FDB\u884C\u4E00\u4E9B\u540E\u5904\u7406\uFF0C\u60A8\u53EF\u80FD\u9700\u8981\u4F7F\u7528\u8FD9\u79CD\u65B9\u6CD5\u3002"),g3.forEach(e),Of=d(t),Ss=r(t,"P",{});var Md=o(Ss);f2=n(Md,"\u60A8\u73B0\u5728\u5DF2\u7ECF\u4E86\u89E3\u4E86 \u{1F917} Datasets\u5982\u4F55\u4EE5\u5404\u79CD\u65B9\u5F0F\u7528\u4E8E\u9884\u5904\u7406\u6570\u636E\u96C6\u3002\u867D\u7136\u{1F917} Datasets \u7684\u5904\u7406\u529F\u80FD\u4F1A\u8986\u76D6\u4F60\u5927\u90E8\u5206\u7684\u6A21\u578B\u8BAD\u7EC3\u9700\u6C42\uFF0C\u6709\u65F6\u60A8\u53EF\u80FD\u9700\u8981\u5207\u6362\u5230 Pandas \u4EE5\u4F7F\u7528\u66F4\u5F3A\u5927\u7684\u529F\u80FD\uFF0C\u4F8B\u5982 "),no=r(Md,"STRONG",{});var $3=o(no);d2=n($3,"DataFrame.groupby()"),$3.forEach(e),u2=n(Md," \u6216\u7528\u4E8E\u53EF\u89C6\u5316\u7684\u9AD8\u7EA7 API\u3002\u5E78\u8FD0\u7684\u662F\uFF0C\u{1F917} Datasets\u65E8\u5728\u4E0E Pandas\u3001NumPy\u3001PyTorch\u3001TensorFlow \u548C JAX \u7B49\u5E93\u53EF\u4EE5\u76F8\u4E92\u8F6C\u6362\u3002\u8BA9\u6211\u4EEC\u6765\u770B\u770B\u8FD9\u662F\u5982\u4F55\u5DE5\u4F5C\u7684\u3002"),Md.forEach(e),Sf=d(t),ns=r(t,"H2",{class:!0});var Bd=o(ns);Rs=r(Bd,"A",{id:!0,class:!0,href:!0});var v3=o(Rs);lo=r(v3,"SPAN",{});var w3=o(lo);_(Ze.$$.fragment,w3),w3.forEach(e),v3.forEach(e),m2=d(Bd),ro=r(Bd,"SPAN",{});var j3=o(ro);_2=n(j3,"`\u{1F917} Datasets \u548C DataFrames \u7684\u76F8\u4E92\u8F6C\u6362"),j3.forEach(e),Bd.forEach(e),Rf=d(t),_(ta.$$.fragment,t),Pf=d(t),Ps=r(t,"P",{});var Jd=o(Ps);h2=n(Jd,"\u4E3A\u4E86\u5B9E\u73B0\u5404\u79CD\u7B2C\u4E09\u65B9\u5E93\u4E4B\u95F4\u7684\u8F6C\u6362\uFF0C\u{1F917} Datasets \u63D0\u4F9B\u4E86\u4E00\u4E2A "),oo=r(Jd,"STRONG",{});var E3=o(oo);c2=n(E3,"Dataset.set_format()"),E3.forEach(e),g2=n(Jd," \u529F\u80FD\u3002\u6B64\u529F\u80FD\u53EF\u4EE5\u901A\u8FC7\u4EC5\u66F4\u6539\u8F93\u51FA\u683C\u5F0F\u7684\uFF0C\u8F7B\u677E\u5207\u6362\u5230\u53E6\u4E00\u79CD\u683C\u5F0F\uFF0C\u800C\u4E0D\u4F1A\u5F71\u54CD\u5E95\u5C42\u6570\u636E\u683C\u5F0F\uFF0C\u5373 Apache Arrow\u3002\u683C\u5F0F\u5316\u4F1A\u5728\u6570\u636E\u672C\u8EAB\u4E0A\u8FDB\u884C\u3002\u4E3A\u4E86\u6F14\u793A\uFF0C\u8BA9\u6211\u4EEC\u5C06\u6570\u636E\u96C6\u8F6C\u6362\u4E3A Pandas\uFF1A"),Jd.forEach(e),Gf=d(t),_(sa.$$.fragment,t),Cf=d(t),Gs=r(t,"P",{});var Ud=o(Gs);$2=n(Ud,"\u73B0\u5728\uFF0C\u5F53\u6211\u4EEC\u8BBF\u95EE\u6570\u636E\u96C6\u7684\u5143\u7D20\u65F6\uFF0C\u6211\u4EEC\u4F1A\u5F97\u5230\u4E00\u4E2A "),io=r(Ud,"STRONG",{});var b3=o(io);v2=n(b3,"pandas.DataFrame"),b3.forEach(e),w2=n(Ud," \u800C\u4E0D\u662F\u5B57\u5178\uFF1A"),Ud.forEach(e),zf=d(t),_(ea.$$.fragment,t),Af=d(t),Gt=r(t,"TABLE",{border:!0,class:!0});var Vd=o(Gt);po=r(Vd,"THEAD",{});var x3=o(po);y=r(x3,"TR",{style:!0});var I=o(y);If=r(I,"TH",{}),o(If).forEach(e),j2=d(I),fo=r(I,"TH",{});var T3=o(fo);E2=n(T3,"patient_id"),T3.forEach(e),b2=d(I),uo=r(I,"TH",{});var D3=o(uo);x2=n(D3,"drugName"),D3.forEach(e),T2=d(I),mo=r(I,"TH",{});var k3=o(mo);D2=n(k3,"condition"),k3.forEach(e),k2=d(I),_o=r(I,"TH",{});var y3=o(_o);y2=n(y3,"review"),y3.forEach(e),q2=d(I),ho=r(I,"TH",{});var q3=o(ho);N2=n(q3,"rating"),q3.forEach(e),O2=d(I),co=r(I,"TH",{});var N3=o(co);S2=n(N3,"date"),N3.forEach(e),R2=d(I),go=r(I,"TH",{});var O3=o(go);P2=n(O3,"usefulCount"),O3.forEach(e),G2=d(I),$o=r(I,"TH",{});var S3=o($o);C2=n(S3,"review_length"),S3.forEach(e),I.forEach(e),x3.forEach(e),z2=d(Vd),ls=r(Vd,"TBODY",{});var fl=o(ls);S=r(fl,"TR",{});var H=o(S);vo=r(H,"TH",{});var R3=o(vo);A2=n(R3,"0"),R3.forEach(e),I2=d(H),wo=r(H,"TD",{});var P3=o(wo);H2=n(P3,"95260"),P3.forEach(e),F2=d(H),jo=r(H,"TD",{});var G3=o(jo);L2=n(G3,"Guanfacine"),G3.forEach(e),M2=d(H),Eo=r(H,"TD",{});var C3=o(Eo);B2=n(C3,"adhd"),C3.forEach(e),J2=d(H),bo=r(H,"TD",{});var z3=o(bo);U2=n(z3,'"My son is halfway through his fourth week of Intuniv..."'),z3.forEach(e),V2=d(H),xo=r(H,"TD",{});var A3=o(xo);Y2=n(A3,"8.0"),A3.forEach(e),W2=d(H),To=r(H,"TD",{});var I3=o(To);X2=n(I3,"April 27, 2010"),I3.forEach(e),K2=d(H),Do=r(H,"TD",{});var H3=o(Do);Q2=n(H3,"192"),H3.forEach(e),Z2=d(H),ko=r(H,"TD",{});var F3=o(ko);tg=n(F3,"141"),F3.forEach(e),H.forEach(e),sg=d(fl),R=r(fl,"TR",{});var F=o(R);yo=r(F,"TH",{});var L3=o(yo);eg=n(L3,"1"),L3.forEach(e),ag=d(F),qo=r(F,"TD",{});var M3=o(qo);ng=n(M3,"92703"),M3.forEach(e),lg=d(F),No=r(F,"TD",{});var B3=o(No);rg=n(B3,"Lybrel"),B3.forEach(e),og=d(F),Oo=r(F,"TD",{});var J3=o(Oo);ig=n(J3,"birth control"),J3.forEach(e),pg=d(F),So=r(F,"TD",{});var U3=o(So);fg=n(U3,'"I used to take another oral contraceptive, which had 21 pill cycle, and was very happy- very light periods, max 5 days, no other side effects..."'),U3.forEach(e),dg=d(F),Ro=r(F,"TD",{});var V3=o(Ro);ug=n(V3,"5.0"),V3.forEach(e),mg=d(F),Po=r(F,"TD",{});var Y3=o(Po);_g=n(Y3,"December 14, 2009"),Y3.forEach(e),hg=d(F),Go=r(F,"TD",{});var W3=o(Go);cg=n(W3,"17"),W3.forEach(e),gg=d(F),Co=r(F,"TD",{});var X3=o(Co);$g=n(X3,"134"),X3.forEach(e),F.forEach(e),vg=d(fl),P=r(fl,"TR",{});var L=o(P);zo=r(L,"TH",{});var K3=o(zo);wg=n(K3,"2"),K3.forEach(e),jg=d(L),Ao=r(L,"TD",{});var Q3=o(Ao);Eg=n(Q3,"138000"),Q3.forEach(e),bg=d(L),Io=r(L,"TD",{});var Z3=o(Io);xg=n(Z3,"Ortho Evra"),Z3.forEach(e),Tg=d(L),Ho=r(L,"TD",{});var tw=o(Ho);Dg=n(tw,"birth control"),tw.forEach(e),kg=d(L),Fo=r(L,"TD",{});var sw=o(Fo);yg=n(sw,'"This is my first time using any form of birth control..."'),sw.forEach(e),qg=d(L),Lo=r(L,"TD",{});var ew=o(Lo);Ng=n(ew,"8.0"),ew.forEach(e),Og=d(L),Mo=r(L,"TD",{});var aw=o(Mo);Sg=n(aw,"November 3, 2015"),aw.forEach(e),Rg=d(L),Bo=r(L,"TD",{});var nw=o(Bo);Pg=n(nw,"10"),nw.forEach(e),Gg=d(L),Jo=r(L,"TD",{});var lw=o(Jo);Cg=n(lw,"89"),lw.forEach(e),L.forEach(e),fl.forEach(e),Vd.forEach(e),Hf=d(t),Ct=r(t,"P",{});var dl=o(Ct);zg=n(dl,"\u8BA9\u6211\u4EEC\u521B\u5EFA\u4E00\u4E2A "),Uo=r(dl,"STRONG",{});var rw=o(Uo);Ag=n(rw,"pandas.DataFrame"),rw.forEach(e),Ig=n(dl," \u6765\u9009\u62E9 "),Vo=r(dl,"STRONG",{});var ow=o(Vo);Hg=n(ow,"drug_dataset[train]"),ow.forEach(e),Fg=n(dl," \u7684\u6240\u6709\u5143\u7D20\uFF1A"),dl.forEach(e),Ff=d(t),_(aa.$$.fragment,t),Lf=d(t),_(Cs.$$.fragment,t),Mf=d(t),zs=r(t,"P",{});var Yd=o(zs);Lg=n(Yd,"\u4ECE\u8FD9\u91CC\u6211\u4EEC\u53EF\u4EE5\u4F7F\u7528\u6211\u4EEC\u60F3\u8981\u7684\u6240\u6709 Pandas \u529F\u80FD\u3002\u4F8B\u5982\uFF0C\u6211\u4EEC\u53EF\u4EE5\u901A\u8FC7\u82B1\u5F0F\u94FE\u63A5\u6765\u8BA1\u7B97 "),Yo=r(Yd,"STRONG",{});var iw=o(Yo);Mg=n(iw,"condition"),iw.forEach(e),Bg=n(Yd,"\u7C7B\u4E4B\u95F4\u7684\u5206\u5E03 \uFF1A"),Yd.forEach(e),Bf=d(t),_(na.$$.fragment,t),Jf=d(t),zt=r(t,"TABLE",{border:!0,class:!0});var Wd=o(zt);Wo=r(Wd,"THEAD",{});var pw=o(Wo);At=r(pw,"TR",{style:!0});var ul=o(At);Uf=r(ul,"TH",{}),o(Uf).forEach(e),Jg=d(ul),Xo=r(ul,"TH",{});var fw=o(Xo);Ug=n(fw,"condition"),fw.forEach(e),Vg=d(ul),Ko=r(ul,"TH",{});var dw=o(Ko);Yg=n(dw,"frequency"),dw.forEach(e),ul.forEach(e),pw.forEach(e),Wg=d(Wd),st=r(Wd,"TBODY",{});var Ut=o(st);rs=r(Ut,"TR",{});var ml=o(rs);Qo=r(ml,"TH",{});var uw=o(Qo);Xg=n(uw,"0"),uw.forEach(e),Kg=d(ml),Zo=r(ml,"TD",{});var mw=o(Zo);Qg=n(mw,"birth control"),mw.forEach(e),Zg=d(ml),ti=r(ml,"TD",{});var _w=o(ti);t1=n(_w,"27655"),_w.forEach(e),ml.forEach(e),s1=d(Ut),os=r(Ut,"TR",{});var _l=o(os);si=r(_l,"TH",{});var hw=o(si);e1=n(hw,"1"),hw.forEach(e),a1=d(_l),ei=r(_l,"TD",{});var cw=o(ei);n1=n(cw,"depression"),cw.forEach(e),l1=d(_l),ai=r(_l,"TD",{});var gw=o(ai);r1=n(gw,"8023"),gw.forEach(e),_l.forEach(e),o1=d(Ut),is=r(Ut,"TR",{});var hl=o(is);ni=r(hl,"TH",{});var $w=o(ni);i1=n($w,"2"),$w.forEach(e),p1=d(hl),li=r(hl,"TD",{});var vw=o(li);f1=n(vw,"acne"),vw.forEach(e),d1=d(hl),ri=r(hl,"TD",{});var ww=o(ri);u1=n(ww,"5209"),ww.forEach(e),hl.forEach(e),m1=d(Ut),ps=r(Ut,"TR",{});var cl=o(ps);oi=r(cl,"TH",{});var jw=o(oi);_1=n(jw,"3"),jw.forEach(e),h1=d(cl),ii=r(cl,"TD",{});var Ew=o(ii);c1=n(Ew,"anxiety"),Ew.forEach(e),g1=d(cl),pi=r(cl,"TD",{});var bw=o(pi);$1=n(bw,"4991"),bw.forEach(e),cl.forEach(e),v1=d(Ut),fs=r(Ut,"TR",{});var gl=o(fs);fi=r(gl,"TH",{});var xw=o(fi);w1=n(xw,"4"),xw.forEach(e),j1=d(gl),di=r(gl,"TD",{});var Tw=o(di);E1=n(Tw,"pain"),Tw.forEach(e),b1=d(gl),ui=r(gl,"TD",{});var Dw=o(ui);x1=n(Dw,"4744"),Dw.forEach(e),gl.forEach(e),Ut.forEach(e),Wd.forEach(e),Vf=d(t),It=r(t,"P",{});var $l=o(It);T1=n($l,"\u4E00\u65E6\u6211\u4EEC\u5B8C\u6210\u4E86 Pandas \u5206\u6790\uFF0C\u6211\u4EEC\u603B\u662F\u901A\u8FC7\u4F7F\u7528\u5BF9\u8C61 "),mi=r($l,"STRONG",{});var kw=o(mi);D1=n(kw,"Dataset.from_pandas()"),kw.forEach(e),k1=n($l,"\u65B9\u6CD5\u53EF\u4EE5\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684 "),_i=r($l,"STRONG",{});var yw=o(_i);y1=n(yw,"Dataset"),yw.forEach(e),q1=n($l," \u5982\u4E0B\uFF1A"),$l.forEach(e),Yf=d(t),_(la.$$.fragment,t),Wf=d(t),_(ra.$$.fragment,t),Xf=d(t),_(As.$$.fragment,t),Kf=d(t),pt=r(t,"P",{});var Ks=o(pt);N1=n(Ks,"\u6211\u4EEC\u5BF9 \u{1F917} Datasets\u4E2D\u53EF\u7528\u7684\u5404\u79CD\u9884\u5904\u7406\u6280\u672F\u7684\u4ECB\u7ECD\u5230\u6B64\u7ED3\u675F\u3002\u5728\u6700\u540E\u4E00\u90E8\u5206\uFF0C\u8BA9\u6211\u4EEC\u521B\u5EFA\u4E00\u4E2A\u9A8C\u8BC1\u96C6\u6765\u51C6\u5907\u7528\u4E8E\u8BAD\u7EC3\u5206\u7C7B\u5668\u7684\u6570\u636E\u96C6\u3002\u5728\u6B64\u4E4B\u524D\uFF0C\u6211\u4EEC\u5C06\u8F93\u51FA\u683C\u5F0F "),hi=r(Ks,"STRONG",{});var qw=o(hi);O1=n(qw,"drug_dataset"),qw.forEach(e),S1=n(Ks," \u4ECE "),ci=r(Ks,"STRONG",{});var Nw=o(ci);R1=n(Nw,"pandas"),Nw.forEach(e),P1=n(Ks,"\u91CD\u7F6E\u5230 "),gi=r(Ks,"STRONG",{});var Ow=o(gi);G1=n(Ow,"arrow"),Ow.forEach(e),C1=n(Ks," \uFF1A"),Ks.forEach(e),Qf=d(t),_(oa.$$.fragment,t),Zf=d(t),ia=r(t,"H2",{id:!0});var Sw=o(ia);z1=n(Sw,"\u521B\u5EFA\u9A8C\u8BC1\u96C6"),Sw.forEach(e),td=d(t),bn=r(t,"P",{});var Rw=o(bn);A1=n(Rw,"\u5C3D\u7BA1\u6211\u4EEC\u6709\u4E00\u4E2A\u53EF\u4EE5\u7528\u4E8E\u8BC4\u4F30\u7684\u6D4B\u8BD5\u96C6\uFF0C\u4F46\u5728\u5F00\u53D1\u8FC7\u7A0B\u4E2D\u4FDD\u6301\u6D4B\u8BD5\u96C6\u4E0D\u53D8\u5E76\u521B\u5EFA\u4E00\u4E2A\u5355\u72EC\u7684\u9A8C\u8BC1\u96C6\u662F\u4E00\u4E2A\u5F88\u597D\u7684\u505A\u6CD5\u3002\u4E00\u65E6\u60A8\u5BF9\u6A21\u578B\u5728\u6D4B\u8BD5\u96C6\u4E0A\u7684\u8868\u73B0\u611F\u5230\u6EE1\u610F\uFF0C\u60A8\u5C31\u53EF\u4EE5\u5BF9\u9A8C\u8BC1\u96C6\u8FDB\u884C\u6700\u7EC8\u7684\u68C0\u67E5\u3002\u6B64\u8FC7\u7A0B\u6709\u52A9\u4E8E\u964D\u4F4E\u60A8\u8FC7\u62DF\u5408\u6D4B\u8BD5\u96C6\u5E76\u90E8\u7F72\u5728\u73B0\u5B9E\u4E16\u754C\u6570\u636E\u4E0A\u5931\u8D25\u7684\u6A21\u578B\u7684\u98CE\u9669\u3002"),Rw.forEach(e),sd=d(t),J=r(t,"P",{});var dt=o(J);I1=n(dt,"\u{1F917} Datasets\u63D0\u4F9B\u4E86\u4E00\u4E2A\u57FA\u4E8E"),$i=r(dt,"STRONG",{});var Pw=o($i);H1=n(Pw,"scikit-learn"),Pw.forEach(e),F1=n(dt,"\u7684\u7ECF\u5178\u65B9\u6CD5"),vi=r(dt,"STRONG",{});var Gw=o(vi);L1=n(Gw,"Dataset.train_test_split()"),Gw.forEach(e),M1=n(dt," .\u8BA9\u6211\u4EEC\u7528\u5B83\u628A\u6211\u4EEC\u7684\u8BAD\u7EC3\u96C6\u5206\u6210 "),wi=r(dt,"STRONG",{});var Cw=o(wi);B1=n(Cw,"train"),Cw.forEach(e),J1=n(dt," \u548C "),ji=r(dt,"STRONG",{});var zw=o(ji);U1=n(zw,"validation"),zw.forEach(e),V1=n(dt," \uFF08\u4E3A\u4E86\u53EF\u4EE5\u590D\u73B0\uFF0C\u6211\u4EEC\u5C06\u8BBE\u7F6E"),Ei=r(dt,"STRONG",{});var Aw=o(Ei);Y1=n(Aw,"seed"),Aw.forEach(e),W1=n(dt,"\u7684\u503C\u4E3A\u4E00\u4E2A\u5E38\u91CF\uFF09\uFF1A"),dt.forEach(e),ed=d(t),_(pa.$$.fragment,t),ad=d(t),_(fa.$$.fragment,t),nd=d(t),xn=r(t,"P",{});var Iw=o(xn);X1=n(Iw,"\u592A\u597D\u4E86\uFF0C\u6211\u4EEC\u73B0\u5728\u5DF2\u7ECF\u51C6\u5907\u597D\u4E86\u4E00\u4E2A\u6570\u636E\u96C6\uFF0C\u53EF\u4EE5\u7528\u6765\u8BAD\u7EC3\u4E00\u4E9B\u6A21\u578B\u4E86\uFF01\u5728[\u7B2C\u4E94\u8282]](/course/chapter5/5)\u6211\u4EEC\u5C06\u5411\u60A8\u5C55\u793A\u5982\u4F55\u5C06\u6570\u636E\u96C6\u4E0A\u4F20\u5230 Hugging Face Hub\uFF0C\u4F46\u73B0\u5728\u8BA9\u6211\u4EEC\u67E5\u770B\u5728\u672C\u5730\u8BA1\u7B97\u673A\u4E0A\u4FDD\u5B58\u6570\u636E\u96C6\u7684\u51E0\u79CD\u65B9\u6CD5\u3002"),Iw.forEach(e),ld=d(t),da=r(t,"H2",{id:!0});var Hw=o(da);K1=n(Hw,"\u4FDD\u5B58\u6570\u636E\u96C6"),Hw.forEach(e),rd=d(t),_(ua.$$.fragment,t),od=d(t),Tn=r(t,"P",{});var Fw=o(Tn);Q1=n(Fw,"\u867D\u7136 \u{1F917} Datasets \u4F1A\u7F13\u5B58\u6BCF\u4E2A\u4E0B\u8F7D\u7684\u6570\u636E\u96C6\u548C\u5BF9\u5B83\u6267\u884C\u7684\u64CD\u4F5C\uFF0C\u4F46\u6709\u65F6\u4F60\u4F1A\u60F3\u8981\u5C06\u6570\u636E\u96C6\u4FDD\u5B58\u5230\u78C1\u76D8\uFF08\u4F8B\u5982\uFF0C\u4EE5\u9632\u7F13\u5B58\u88AB\u5220\u9664\uFF09\u3002\u5982\u4E0B\u8868\u6240\u793A\uFF0C\u{1F917} Datasets \u63D0\u4F9B\u4E86\u4E09\u4E2A\u4E3B\u8981\u529F\u80FD\u6765\u4EE5\u4E0D\u540C\u7684\u683C\u5F0F\u4FDD\u5B58\u60A8\u7684\u6570\u636E\u96C6\uFF1A"),Fw.forEach(e),id=d(t),Is=r(t,"TABLE",{});var Xd=o(Is);bi=r(Xd,"THEAD",{});var Lw=o(bi);ma=r(Lw,"TR",{});var Kd=o(ma);Dn=r(Kd,"TH",{align:!0});var Mw=o(Dn);Z1=n(Mw,"\u6570\u636E\u683C\u5F0F"),Mw.forEach(e),t$=d(Kd),kn=r(Kd,"TH",{align:!0});var Bw=o(kn);s$=n(Bw,"\u5BF9\u5E94\u7684\u65B9\u6CD5"),Bw.forEach(e),Kd.forEach(e),Lw.forEach(e),e$=d(Xd),ds=r(Xd,"TBODY",{});var vl=o(ds);_a=r(vl,"TR",{});var Qd=o(_a);yn=r(Qd,"TD",{align:!0});var Jw=o(yn);a$=n(Jw,"Arrow"),Jw.forEach(e),n$=d(Qd),qn=r(Qd,"TD",{align:!0});var Uw=o(qn);xi=r(Uw,"CODE",{});var Vw=o(xi);l$=n(Vw,"Dataset.save_to_disk()"),Vw.forEach(e),Uw.forEach(e),Qd.forEach(e),r$=d(vl),ha=r(vl,"TR",{});var Zd=o(ha);Nn=r(Zd,"TD",{align:!0});var Yw=o(Nn);o$=n(Yw,"CSV"),Yw.forEach(e),i$=d(Zd),On=r(Zd,"TD",{align:!0});var Ww=o(On);Ti=r(Ww,"CODE",{});var Xw=o(Ti);p$=n(Xw,"Dataset.to_csv()"),Xw.forEach(e),Ww.forEach(e),Zd.forEach(e),f$=d(vl),ca=r(vl,"TR",{});var tu=o(ca);Sn=r(tu,"TD",{align:!0});var Kw=o(Sn);d$=n(Kw,"JSON"),Kw.forEach(e),u$=d(tu),Rn=r(tu,"TD",{align:!0});var Qw=o(Rn);Di=r(Qw,"CODE",{});var Zw=o(Di);m$=n(Zw,"Dataset.to_json()"),Zw.forEach(e),Qw.forEach(e),tu.forEach(e),vl.forEach(e),Xd.forEach(e),pd=d(t),Pn=r(t,"P",{});var t4=o(Pn);_$=n(t4,"\u4F8B\u5982\uFF0C\u8BA9\u6211\u4EEC\u4EE5 Arrow \u683C\u5F0F\u4FDD\u5B58\u6211\u4EEC\u6E05\u6D17\u8FC7\u7684\u6570\u636E\u96C6\uFF1A"),t4.forEach(e),fd=d(t),_(ga.$$.fragment,t),dd=d(t),Gn=r(t,"P",{});var s4=o(Gn);h$=n(s4,"\u8FD9\u5C06\u521B\u5EFA\u4E00\u4E2A\u5177\u6709\u4EE5\u4E0B\u7ED3\u6784\u7684\u76EE\u5F55\uFF1A"),s4.forEach(e),ud=d(t),_($a.$$.fragment,t),md=d(t),Cn=r(t,"P",{});var e4=o(Cn);c$=n(e4,"\u5728\u90A3\u91CC\u6211\u4EEC\u53EF\u4EE5\u770B\u5230\u6BCF\u4E2A\u90E8\u5206.arrow\u8868\uFF0C\u4EE5\u53CA\u4E00\u4E9B\u5143\u6570\u636E\u6570\u636E\u96C6\u4FE1\u606F.json\u548C\u72B6\u6001\u6587\u4EF6\u4FDD\u5B58\u5728\u4E00\u8D77.\u60A8\u53EF\u4EE5\u5C06 Arrow \u683C\u5F0F\u89C6\u4E3A\u4E00\u4E2A\u7CBE\u7F8E\u7684\u5217\u548C\u884C\u7684\u8868\u683C\uFF0C\u5B83\u9488\u5BF9\u6784\u5EFA\u5904\u7406\u548C\u4F20\u8F93\u5927\u578B\u6570\u636E\u96C6\u7684\u9AD8\u6027\u80FD\u5E94\u7528\u7A0B\u5E8F\u8FDB\u884C\u4E86\u4F18\u5316\u3002"),e4.forEach(e),_d=d(t),Hs=r(t,"P",{});var su=o(Hs);g$=n(su,"\u4FDD\u5B58\u6570\u636E\u96C6\u540E\uFF0C\u6211\u4EEC\u53EF\u4EE5\u4F7F\u7528 "),ki=r(su,"STRONG",{});var a4=o(ki);$$=n(a4,"load_from_disk()"),a4.forEach(e),v$=n(su," \u529F\u80FD\u4ECE\u78C1\u76D8\u8BFB\u53D6\u6570\u636E\u5982\u4E0B\uFF1A"),su.forEach(e),hd=d(t),_(va.$$.fragment,t),cd=d(t),_(wa.$$.fragment,t),gd=d(t),Fs=r(t,"P",{});var eu=o(Fs);w$=n(eu,"\u5BF9\u4E8E CSV \u548C JSON \u683C\u5F0F\uFF0C\u6211\u4EEC\u5FC5\u987B\u5C06\u6BCF\u4E2A\u90E8\u5206\u5B58\u50A8\u4E3A\u5355\u72EC\u7684\u6587\u4EF6\u3002\u4E00\u79CD\u65B9\u6CD5\u662F\u8FED\u4EE3"),yi=r(eu,"STRONG",{});var n4=o(yi);j$=n(n4,"DatasetDict"),n4.forEach(e),E$=n(eu,"\u4E2D\u7684\u952E\u548C\u503C \uFF1A"),eu.forEach(e),$d=d(t),_(ja.$$.fragment,t),vd=d(t),Ls=r(t,"P",{});var au=o(Ls);b$=n(au,"\u8FD9\u5C06\u4FDD\u5B58\u6BCF\u4E2A\u62C6\u5206\u90FD\u662F"),Ea=r(au,"A",{href:!0,rel:!0});var l4=o(Ea);x$=n(l4,"JSON\u7684\u6807\u51C6\u683C\u5F0F"),l4.forEach(e),T$=n(au,"\uFF0C\u5176\u4E2D\u6570\u636E\u96C6\u4E2D\u7684\u6BCF\u4E00\u884C\u90FD\u5B58\u50A8\u4E3A\u4E00\u884C JSON\u3002\u8FD9\u662F\u7B2C\u4E00\u4E2A\u793A\u4F8B\uFF1A"),au.forEach(e),wd=d(t),_(ba.$$.fragment,t),jd=d(t),_(xa.$$.fragment,t),Ed=d(t),Ms=r(t,"P",{});var nu=o(Ms);D$=n(nu,"\u7136\u540E\u6211\u4EEC\u53EF\u4EE5\u4F7F\u7528"),zn=r(nu,"A",{href:!0});var r4=o(zn);k$=n(r4,"\u7B2C\u4E8C\u8282"),r4.forEach(e),y$=n(nu,"\u5B66\u8FC7\u7684\u6280\u672F\u52A0\u8F7D JSON \u6587\u4EF6\u5982\u4E0B\uFF1A"),nu.forEach(e),bd=d(t),_(Ta.$$.fragment,t),xd=d(t),An=r(t,"P",{});var o4=o(An);q$=n(o4,"\u8FD9\u5C31\u662F\u6211\u4EEC\u63A2\u7D22 \u{1F917} Datasets \u7684\u65C5\u7A0B\uFF01\u73B0\u5728\u6211\u4EEC\u6709\u4E86\u4E00\u4E2A\u6E05\u6D17\u8FC7\u7684\u6570\u636E\u96C6\uFF0C\u4EE5\u4E0B\u662F\u60A8\u53EF\u4EE5\u5C1D\u8BD5\u7684\u4E00\u4E9B\u60F3\u6CD5\uFF1A"),o4.forEach(e),Td=d(t),Bs=r(t,"OL",{});var lu=o(Bs);Da=r(lu,"LI",{});var ru=o(Da);N$=n(ru,"\u4F7F\u7528"),In=r(ru,"A",{href:!0});var i4=o(In);O$=n(i4,"\u7B2C3\u7AE0"),i4.forEach(e),S$=n(ru,"\u7684\u6280\u672F\u6765\u8BAD\u7EC3\u4E00\u4E2A\u5206\u7C7B\u5668\uFF0C\u5B83\u53EF\u4EE5\u6839\u636E\u836F\u7269\u8BC4\u8BBA\u9884\u6D4B\u75C5\u4EBA\u7684\u60C5\u51B5\u3002"),ru.forEach(e),R$=d(lu),ka=r(lu,"LI",{});var ou=o(ka);P$=n(ou,"\u4F7F\u7528 "),Hn=r(ou,"A",{href:!0});var p4=o(Hn);G$=n(p4,"Chapter 1"),p4.forEach(e),C$=n(ou," \u4E2D\u7684\u201Csummarization\u201D\u7BA1\u9053\u751F\u6210\u8BC4\u8BBA\u6458\u8981\u3002"),ou.forEach(e),lu.forEach(e),Dd=d(t),Fn=r(t,"P",{});var f4=o(Fn);z$=n(f4,"\u63A5\u4E0B\u6765\uFF0C\u6211\u4EEC\u5C06\u770B\u770B \u{1F917} Datasets\u5982\u4F55\u4F7F\u60A8\u80FD\u591F\u5728\u4E0D\u6491\u7206\u7B14\u8BB0\u672C\u7535\u8111\u5185\u5B58\u7684\u60C5\u51B5\u4E0B\u5904\u7406\u5E9E\u5927\u7684\u6570\u636E\u96C6\uFF01"),f4.forEach(e),this.h()},h(){v(u,"name","hf:doc:metadata"),v(u,"content",JSON.stringify(k4)),v(j,"id",""),v(U,"id",""),v(at,"href","/course/chapter3"),v(jt,"href","https://archive.ics.uci.edu/ml/index.php"),v(jt,"rel","nofollow"),v(Et,"href","https://archive.ics.uci.edu/ml/datasets/Drug+Review+Dataset+%28Drugs.com%29"),v(Et,"rel","nofollow"),v(Ca,"href","/course/chapter3"),v(he,"href","https://docs.python.org/3/reference/lexical_analysis.html#keywords"),v(he,"rel","nofollow"),v(je,"href","https://realpython.com/python-lambda/"),v(je,"rel","nofollow"),v(_s,"id","creating-new-columns"),v(_s,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),v(_s,"href","#creating-new-columns"),v(Yt,"class","relative group"),v(ws,"id","map"),v(ws,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),v(ws,"href","#map"),v(Wt,"class","relative group"),v(Ba,"href","/course/chapter6"),v(Ja,"href","/course/chapter3"),v(Va,"align","center"),v(Ya,"align","center"),v(Wa,"align","center"),v(Xa,"align","center"),v(Ka,"align","center"),v(Qa,"align","center"),v(Za,"align","center"),v(tn,"align","center"),v(sn,"align","center"),v(nn,"align","center"),v(ln,"align","center"),v(rn,"align","center"),v(on,"align","center"),v(pn,"align","center"),v(fn,"align","center"),v(dn,"align","center"),v(un,"align","center"),v(mn,"align","center"),v(Ts,"align","center"),v(_n,"align","center"),v(hn,"align","center"),v(Ds,"align","center"),v(cn,"align","center"),v(gn,"align","center"),v($n,"href","/course/chapter7"),v(Rs,"id","datasets-dataframes"),v(Rs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),v(Rs,"href","#datasets-dataframes"),v(ns,"class","relative group"),d4(y,"text-align","right"),v(Gt,"border","1"),v(Gt,"class","dataframe"),d4(At,"text-align","right"),v(zt,"border","1"),v(zt,"class","dataframe"),v(ia,"id",""),v(da,"id",""),v(Dn,"align","center"),v(kn,"align","center"),v(yn,"align","center"),v(qn,"align","center"),v(Nn,"align","center"),v(On,"align","center"),v(Sn,"align","center"),v(Rn,"align","center"),v(Ea,"href","https://jsonlines.org"),v(Ea,"rel","nofollow"),v(zn,"href","/course/chapter5/2"),v(In,"href","/course/chapter3"),v(Hn,"href","/course/chapter1")},m(t,i){s(document.head,u),p(t,b,i),p(t,j,i),s(j,E),p(t,G,i),h(x,t,i),p(t,k,i),p(t,q,i),s(q,N),p(t,O,i),h(A,t,i),p(t,C,i),p(t,U,i),s(U,ut),p(t,M,i),p(t,T,i),s(T,$t),s(T,V),s(V,vt),s(T,wt),s(T,mt),s(mt,Zs),s(T,te),s(T,at),s(at,se),s(T,ee),s(T,_t),s(_t,D),s(T,Na),p(t,ae,i),p(t,tt,i),s(tt,Oa),s(tt,jt),s(jt,Sa),s(tt,Ra),s(tt,Et),s(Et,iu),s(tt,pu),p(t,Ci,i),p(t,bt,i),s(bt,fu),s(bt,wl),s(wl,du),s(bt,uu),s(bt,jl),s(jl,mu),s(bt,_u),p(t,zi,i),h(ne,t,i),p(t,Ai,i),p(t,xt,i),s(xt,hu),s(xt,El),s(El,cu),s(xt,gu),s(xt,bl),s(bl,$u),s(xt,vu),p(t,Ii,i),h(le,t,i),p(t,Hi,i),p(t,Tt,i),s(Tt,wu),s(Tt,xl),s(xl,ju),s(Tt,Eu),s(Tt,Tl),s(Tl,bu),s(Tt,xu),p(t,Fi,i),h(re,t,i),p(t,Li,i),h(oe,t,i),p(t,Mi,i),p(t,nt,i),s(nt,Tu),s(nt,Dl),s(Dl,Du),s(nt,ku),s(nt,kl),s(kl,yu),s(nt,qu),s(nt,yl),s(yl,Nu),s(nt,Ou),p(t,Bi,i),p(t,Dt,i),s(Dt,Pa),s(Pa,ql),s(ql,Su),s(Pa,Ru),s(Dt,Pu),s(Dt,Ga),s(Ga,Nl),s(Nl,Gu),s(Ga,Cu),s(Dt,zu),s(Dt,Vt),s(Vt,Au),s(Vt,Ol),s(Ol,Iu),s(Vt,Hu),s(Vt,Sl),s(Sl,Fu),s(Vt,Lu),p(t,Ji,i),p(t,kt,i),s(kt,Mu),s(kt,Rl),s(Rl,Bu),s(kt,Ju),s(kt,Pl),s(Pl,Uu),s(kt,Vu),p(t,Ui,i),h(ie,t,i),p(t,Vi,i),p(t,yt,i),s(yt,Yu),s(yt,Gl),s(Gl,Wu),s(yt,Xu),s(yt,Cl),s(Cl,Ku),s(yt,Qu),p(t,Yi,i),h(pe,t,i),p(t,Wi,i),h(fe,t,i),p(t,Xi,i),h(us,t,i),p(t,Ki,i),p(t,Y,i),s(Y,Zu),s(Y,zl),s(zl,tm),s(Y,sm),s(Y,Al),s(Al,em),s(Y,am),s(Y,Ca),s(Ca,nm),s(Y,lm),s(Y,Il),s(Il,rm),s(Y,om),p(t,Qi,i),h(de,t,i),p(t,Zi,i),h(ue,t,i),p(t,tp,i),p(t,W,i),s(W,im),s(W,Hl),s(Hl,pm),s(W,fm),s(W,Fl),s(Fl,dm),s(W,um),s(W,Ll),s(Ll,mm),s(W,_m),s(W,Ml),s(Ml,hm),s(W,cm),p(t,sp,i),h(me,t,i),p(t,ep,i),p(t,ms,i),s(ms,gm),s(ms,Bl),s(Bl,$m),s(ms,vm),p(t,ap,i),h(_e,t,i),p(t,np,i),p(t,X,i),s(X,wm),s(X,Jl),s(Jl,jm),s(X,Em),s(X,he),s(he,bm),s(X,xm),s(X,Ul),s(Ul,Tm),s(X,Dm),s(X,Vl),s(Vl,km),s(X,ym),p(t,lp,i),h(ce,t,i),p(t,rp,i),p(t,za,i),s(za,qm),p(t,op,i),h(ge,t,i),p(t,ip,i),h($e,t,i),p(t,pp,i),p(t,Aa,i),s(Aa,Nm),p(t,fp,i),h(ve,t,i),p(t,dp,i),h(we,t,i),p(t,up,i),p(t,qt,i),s(qt,Om),s(qt,je),s(je,Sm),s(qt,Rm),s(qt,Yl),s(Yl,Pm),s(qt,Gm),p(t,mp,i),h(Ee,t,i),p(t,_p,i),p(t,Nt,i),s(Nt,Cm),s(Nt,Wl),s(Wl,zm),s(Nt,Am),s(Nt,Xl),s(Xl,Im),s(Nt,Hm),p(t,hp,i),h(be,t,i),p(t,cp,i),h(xe,t,i),p(t,gp,i),p(t,Ia,i),s(Ia,Fm),p(t,$p,i),p(t,Yt,i),s(Yt,_s),s(_s,Kl),h(Te,Kl,null),s(Yt,Lm),s(Yt,Ql),s(Ql,Mm),p(t,vp,i),p(t,Ha,i),s(Ha,Bm),p(t,wp,i),p(t,Fa,i),s(Fa,Jm),p(t,jp,i),h(De,t,i),p(t,Ep,i),p(t,B,i),s(B,Um),s(B,Zl),s(Zl,Vm),s(B,Ym),s(B,tr),s(tr,Wm),s(B,Xm),s(B,sr),s(sr,Km),s(B,Qm),s(B,er),s(er,Zm),s(B,t_),s(B,ar),s(ar,s_),s(B,e_),p(t,bp,i),h(ke,t,i),p(t,xp,i),h(ye,t,i),p(t,Tp,i),p(t,Ot,i),s(Ot,a_),s(Ot,nr),s(nr,n_),s(Ot,l_),s(Ot,lr),s(lr,r_),s(Ot,o_),p(t,Dp,i),h(qe,t,i),p(t,kp,i),h(Ne,t,i),p(t,yp,i),p(t,La,i),s(La,i_),p(t,qp,i),h(hs,t,i),p(t,Np,i),p(t,St,i),s(St,p_),s(St,rr),s(rr,f_),s(St,d_),s(St,or),s(or,u_),s(St,m_),p(t,Op,i),h(Oe,t,i),p(t,Sp,i),h(Se,t,i),p(t,Rp,i),p(t,Ma,i),s(Ma,__),p(t,Pp,i),h(cs,t,i),p(t,Gp,i),p(t,gs,i),s(gs,h_),s(gs,ir),s(ir,c_),s(gs,g_),p(t,Cp,i),h(Re,t,i),p(t,zp,i),h(Pe,t,i),p(t,Ap,i),p(t,$s,i),s($s,$_),s($s,pr),s(pr,v_),s($s,w_),p(t,Ip,i),h(Ge,t,i),p(t,Hp,i),p(t,vs,i),s(vs,j_),s(vs,fr),s(fr,E_),s(vs,b_),p(t,Fp,i),p(t,Wt,i),s(Wt,ws),s(ws,dr),h(Ce,dr,null),s(Wt,x_),s(Wt,ur),s(ur,T_),p(t,Lp,i),p(t,ht,i),s(ht,mr),s(mr,D_),s(ht,k_),s(ht,_r),s(_r,y_),s(ht,q_),s(ht,hr),s(hr,N_),s(ht,O_),p(t,Mp,i),p(t,K,i),s(K,S_),s(K,cr),s(cr,R_),s(K,P_),s(K,gr),s(gr,G_),s(K,C_),s(K,$r),s($r,z_),s(K,A_),s(K,vr),s(vr,I_),s(K,H_),p(t,Bp,i),h(ze,t,i),p(t,Jp,i),p(t,Rt,i),s(Rt,F_),s(Rt,wr),s(wr,L_),s(Rt,M_),s(Rt,jr),s(jr,B_),s(Rt,J_),p(t,Up,i),p(t,lt,i),s(lt,U_),s(lt,Ba),s(Ba,V_),s(lt,Y_),s(lt,Er),s(Er,W_),s(lt,X_),s(lt,br),s(br,K_),s(lt,Q_),p(t,Vp,i),h(Ae,t,i),p(t,Yp,i),p(t,rt,i),s(rt,Z_),s(rt,Ja),s(Ja,th),s(rt,sh),s(rt,xr),s(xr,eh),s(rt,ah),s(rt,Tr),s(Tr,nh),s(rt,lh),p(t,Wp,i),h(Ie,t,i),p(t,Xp,i),p(t,js,i),s(js,rh),s(js,Dr),s(Dr,oh),s(js,ih),p(t,Kp,i),h(Es,t,i),p(t,Qp,i),p(t,Ua,i),s(Ua,ph),p(t,Zp,i),p(t,bs,i),s(bs,kr),s(kr,Xt),s(Xt,Va),s(Va,fh),s(Xt,dh),s(Xt,Ya),s(Ya,uh),s(Xt,mh),s(Xt,Wa),s(Wa,_h),s(bs,hh),s(bs,He),s(He,Kt),s(Kt,Xa),s(Xa,yr),s(yr,ch),s(Kt,gh),s(Kt,Ka),s(Ka,$h),s(Kt,vh),s(Kt,Qa),s(Qa,wh),s(He,jh),s(He,Qt),s(Qt,Za),s(Za,qr),s(qr,Eh),s(Qt,bh),s(Qt,tn),s(tn,xh),s(Qt,Th),s(Qt,sn),s(sn,Dh),p(t,tf,i),p(t,ot,i),s(ot,kh),s(ot,Nr),s(Nr,yh),s(ot,qh),s(ot,Or),s(Or,Nh),s(ot,Oh),s(ot,Sr),s(Sr,Sh),s(ot,Rh),p(t,sf,i),p(t,en,i),s(en,Ph),p(t,ef,i),p(t,ct,i),s(ct,Rr),s(Rr,Gh),s(ct,Ch),s(ct,Pr),s(Pr,zh),s(ct,Ah),s(ct,Gr),s(Gr,Ih),s(ct,Hh),p(t,af,i),h(Fe,t,i),p(t,nf,i),p(t,an,i),s(an,Fh),p(t,lf,i),p(t,xs,i),s(xs,Cr),s(Cr,Zt),s(Zt,nn),s(nn,Lh),s(Zt,Mh),s(Zt,ln),s(ln,Bh),s(Zt,Jh),s(Zt,rn),s(rn,Uh),s(xs,Vh),s(xs,gt),s(gt,ts),s(ts,on),s(on,zr),s(zr,Yh),s(ts,Wh),s(ts,pn),s(pn,Xh),s(ts,Kh),s(ts,fn),s(fn,Qh),s(gt,Zh),s(gt,ss),s(ss,dn),s(dn,Ar),s(Ar,tc),s(ss,sc),s(ss,un),s(un,ec),s(ss,ac),s(ss,mn),s(mn,nc),s(gt,lc),s(gt,es),s(es,Ts),s(Ts,Ir),s(Ir,rc),s(Ts,oc),s(Ts,Hr),s(Hr,ic),s(es,pc),s(es,_n),s(_n,fc),s(es,dc),s(es,hn),s(hn,uc),s(gt,mc),s(gt,as),s(as,Ds),s(Ds,Fr),s(Fr,_c),s(Ds,hc),s(Ds,Lr),s(Lr,cc),s(as,gc),s(as,cn),s(cn,$c),s(as,vc),s(as,gn),s(gn,wc),p(t,rf,i),p(t,Q,i),s(Q,jc),s(Q,Mr),s(Mr,Ec),s(Q,bc),s(Q,Br),s(Br,xc),s(Q,Tc),s(Q,Jr),s(Jr,Dc),s(Q,kc),s(Q,Ur),s(Ur,yc),s(Q,qc),p(t,of,i),h(ks,t,i),p(t,pf,i),p(t,it,i),s(it,Nc),s(it,Vr),s(Vr,Oc),s(it,Sc),s(it,Yr),s(Yr,Rc),s(it,Pc),s(it,$n),s($n,Gc),s(it,Cc),p(t,ff,i),h(ys,t,i),p(t,df,i),p(t,qs,i),s(qs,zc),s(qs,Wr),s(Wr,Ac),s(qs,Ic),p(t,uf,i),h(Le,t,i),p(t,mf,i),p(t,Ns,i),s(Ns,Hc),s(Ns,Xr),s(Xr,Fc),s(Ns,Lc),p(t,_f,i),h(Me,t,i),p(t,hf,i),h(Be,t,i),p(t,cf,i),p(t,vn,i),s(vn,Mc),p(t,gf,i),h(Je,t,i),p(t,$f,i),h(Ue,t,i),p(t,vf,i),p(t,wn,i),s(wn,Bc),p(t,wf,i),p(t,Z,i),s(Z,Jc),s(Z,Kr),s(Kr,Uc),s(Z,Vc),s(Z,Qr),s(Qr,Yc),s(Z,Wc),s(Z,Zr),s(Zr,Xc),s(Z,Kc),s(Z,to),s(to,Qc),s(Z,Zc),p(t,jf,i),h(Ve,t,i),p(t,Ef,i),p(t,jn,i),s(jn,t2),p(t,bf,i),h(Ye,t,i),p(t,xf,i),h(We,t,i),p(t,Tf,i),p(t,Pt,i),s(Pt,s2),s(Pt,so),s(so,e2),s(Pt,a2),s(Pt,eo),s(eo,n2),s(Pt,l2),p(t,Df,i),h(Xe,t,i),p(t,kf,i),p(t,Os,i),s(Os,r2),s(Os,ao),s(ao,o2),s(Os,i2),p(t,yf,i),h(Ke,t,i),p(t,qf,i),h(Qe,t,i),p(t,Nf,i),p(t,En,i),s(En,p2),p(t,Of,i),p(t,Ss,i),s(Ss,f2),s(Ss,no),s(no,d2),s(Ss,u2),p(t,Sf,i),p(t,ns,i),s(ns,Rs),s(Rs,lo),h(Ze,lo,null),s(ns,m2),s(ns,ro),s(ro,_2),p(t,Rf,i),h(ta,t,i),p(t,Pf,i),p(t,Ps,i),s(Ps,h2),s(Ps,oo),s(oo,c2),s(Ps,g2),p(t,Gf,i),h(sa,t,i),p(t,Cf,i),p(t,Gs,i),s(Gs,$2),s(Gs,io),s(io,v2),s(Gs,w2),p(t,zf,i),h(ea,t,i),p(t,Af,i),p(t,Gt,i),s(Gt,po),s(po,y),s(y,If),s(y,j2),s(y,fo),s(fo,E2),s(y,b2),s(y,uo),s(uo,x2),s(y,T2),s(y,mo),s(mo,D2),s(y,k2),s(y,_o),s(_o,y2),s(y,q2),s(y,ho),s(ho,N2),s(y,O2),s(y,co),s(co,S2),s(y,R2),s(y,go),s(go,P2),s(y,G2),s(y,$o),s($o,C2),s(Gt,z2),s(Gt,ls),s(ls,S),s(S,vo),s(vo,A2),s(S,I2),s(S,wo),s(wo,H2),s(S,F2),s(S,jo),s(jo,L2),s(S,M2),s(S,Eo),s(Eo,B2),s(S,J2),s(S,bo),s(bo,U2),s(S,V2),s(S,xo),s(xo,Y2),s(S,W2),s(S,To),s(To,X2),s(S,K2),s(S,Do),s(Do,Q2),s(S,Z2),s(S,ko),s(ko,tg),s(ls,sg),s(ls,R),s(R,yo),s(yo,eg),s(R,ag),s(R,qo),s(qo,ng),s(R,lg),s(R,No),s(No,rg),s(R,og),s(R,Oo),s(Oo,ig),s(R,pg),s(R,So),s(So,fg),s(R,dg),s(R,Ro),s(Ro,ug),s(R,mg),s(R,Po),s(Po,_g),s(R,hg),s(R,Go),s(Go,cg),s(R,gg),s(R,Co),s(Co,$g),s(ls,vg),s(ls,P),s(P,zo),s(zo,wg),s(P,jg),s(P,Ao),s(Ao,Eg),s(P,bg),s(P,Io),s(Io,xg),s(P,Tg),s(P,Ho),s(Ho,Dg),s(P,kg),s(P,Fo),s(Fo,yg),s(P,qg),s(P,Lo),s(Lo,Ng),s(P,Og),s(P,Mo),s(Mo,Sg),s(P,Rg),s(P,Bo),s(Bo,Pg),s(P,Gg),s(P,Jo),s(Jo,Cg),p(t,Hf,i),p(t,Ct,i),s(Ct,zg),s(Ct,Uo),s(Uo,Ag),s(Ct,Ig),s(Ct,Vo),s(Vo,Hg),s(Ct,Fg),p(t,Ff,i),h(aa,t,i),p(t,Lf,i),h(Cs,t,i),p(t,Mf,i),p(t,zs,i),s(zs,Lg),s(zs,Yo),s(Yo,Mg),s(zs,Bg),p(t,Bf,i),h(na,t,i),p(t,Jf,i),p(t,zt,i),s(zt,Wo),s(Wo,At),s(At,Uf),s(At,Jg),s(At,Xo),s(Xo,Ug),s(At,Vg),s(At,Ko),s(Ko,Yg),s(zt,Wg),s(zt,st),s(st,rs),s(rs,Qo),s(Qo,Xg),s(rs,Kg),s(rs,Zo),s(Zo,Qg),s(rs,Zg),s(rs,ti),s(ti,t1),s(st,s1),s(st,os),s(os,si),s(si,e1),s(os,a1),s(os,ei),s(ei,n1),s(os,l1),s(os,ai),s(ai,r1),s(st,o1),s(st,is),s(is,ni),s(ni,i1),s(is,p1),s(is,li),s(li,f1),s(is,d1),s(is,ri),s(ri,u1),s(st,m1),s(st,ps),s(ps,oi),s(oi,_1),s(ps,h1),s(ps,ii),s(ii,c1),s(ps,g1),s(ps,pi),s(pi,$1),s(st,v1),s(st,fs),s(fs,fi),s(fi,w1),s(fs,j1),s(fs,di),s(di,E1),s(fs,b1),s(fs,ui),s(ui,x1),p(t,Vf,i),p(t,It,i),s(It,T1),s(It,mi),s(mi,D1),s(It,k1),s(It,_i),s(_i,y1),s(It,q1),p(t,Yf,i),h(la,t,i),p(t,Wf,i),h(ra,t,i),p(t,Xf,i),h(As,t,i),p(t,Kf,i),p(t,pt,i),s(pt,N1),s(pt,hi),s(hi,O1),s(pt,S1),s(pt,ci),s(ci,R1),s(pt,P1),s(pt,gi),s(gi,G1),s(pt,C1),p(t,Qf,i),h(oa,t,i),p(t,Zf,i),p(t,ia,i),s(ia,z1),p(t,td,i),p(t,bn,i),s(bn,A1),p(t,sd,i),p(t,J,i),s(J,I1),s(J,$i),s($i,H1),s(J,F1),s(J,vi),s(vi,L1),s(J,M1),s(J,wi),s(wi,B1),s(J,J1),s(J,ji),s(ji,U1),s(J,V1),s(J,Ei),s(Ei,Y1),s(J,W1),p(t,ed,i),h(pa,t,i),p(t,ad,i),h(fa,t,i),p(t,nd,i),p(t,xn,i),s(xn,X1),p(t,ld,i),p(t,da,i),s(da,K1),p(t,rd,i),h(ua,t,i),p(t,od,i),p(t,Tn,i),s(Tn,Q1),p(t,id,i),p(t,Is,i),s(Is,bi),s(bi,ma),s(ma,Dn),s(Dn,Z1),s(ma,t$),s(ma,kn),s(kn,s$),s(Is,e$),s(Is,ds),s(ds,_a),s(_a,yn),s(yn,a$),s(_a,n$),s(_a,qn),s(qn,xi),s(xi,l$),s(ds,r$),s(ds,ha),s(ha,Nn),s(Nn,o$),s(ha,i$),s(ha,On),s(On,Ti),s(Ti,p$),s(ds,f$),s(ds,ca),s(ca,Sn),s(Sn,d$),s(ca,u$),s(ca,Rn),s(Rn,Di),s(Di,m$),p(t,pd,i),p(t,Pn,i),s(Pn,_$),p(t,fd,i),h(ga,t,i),p(t,dd,i),p(t,Gn,i),s(Gn,h$),p(t,ud,i),h($a,t,i),p(t,md,i),p(t,Cn,i),s(Cn,c$),p(t,_d,i),p(t,Hs,i),s(Hs,g$),s(Hs,ki),s(ki,$$),s(Hs,v$),p(t,hd,i),h(va,t,i),p(t,cd,i),h(wa,t,i),p(t,gd,i),p(t,Fs,i),s(Fs,w$),s(Fs,yi),s(yi,j$),s(Fs,E$),p(t,$d,i),h(ja,t,i),p(t,vd,i),p(t,Ls,i),s(Ls,b$),s(Ls,Ea),s(Ea,x$),s(Ls,T$),p(t,wd,i),h(ba,t,i),p(t,jd,i),h(xa,t,i),p(t,Ed,i),p(t,Ms,i),s(Ms,D$),s(Ms,zn),s(zn,k$),s(Ms,y$),p(t,bd,i),h(Ta,t,i),p(t,xd,i),p(t,An,i),s(An,q$),p(t,Td,i),p(t,Bs,i),s(Bs,Da),s(Da,N$),s(Da,In),s(In,O$),s(Da,S$),s(Bs,R$),s(Bs,ka),s(ka,P$),s(ka,Hn),s(Hn,G$),s(ka,C$),p(t,Dd,i),p(t,Fn,i),s(Fn,z$),kd=!0},p(t,[i]){const qi={};i&2&&(qi.$$scope={dirty:i,ctx:t}),us.$set(qi);const Ni={};i&2&&(Ni.$$scope={dirty:i,ctx:t}),hs.$set(Ni);const Oi={};i&2&&(Oi.$$scope={dirty:i,ctx:t}),cs.$set(Oi);const et={};i&2&&(et.$$scope={dirty:i,ctx:t}),Es.$set(et);const Si={};i&2&&(Si.$$scope={dirty:i,ctx:t}),ks.$set(Si);const Ri={};i&2&&(Ri.$$scope={dirty:i,ctx:t}),ys.$set(Ri);const Pi={};i&2&&(Pi.$$scope={dirty:i,ctx:t}),Cs.$set(Pi);const Gi={};i&2&&(Gi.$$scope={dirty:i,ctx:t}),As.$set(Gi)},i(t){kd||(c(x.$$.fragment,t),c(A.$$.fragment,t),c(ne.$$.fragment,t),c(le.$$.fragment,t),c(re.$$.fragment,t),c(oe.$$.fragment,t),c(ie.$$.fragment,t),c(pe.$$.fragment,t),c(fe.$$.fragment,t),c(us.$$.fragment,t),c(de.$$.fragment,t),c(ue.$$.fragment,t),c(me.$$.fragment,t),c(_e.$$.fragment,t),c(ce.$$.fragment,t),c(ge.$$.fragment,t),c($e.$$.fragment,t),c(ve.$$.fragment,t),c(we.$$.fragment,t),c(Ee.$$.fragment,t),c(be.$$.fragment,t),c(xe.$$.fragment,t),c(Te.$$.fragment,t),c(De.$$.fragment,t),c(ke.$$.fragment,t),c(ye.$$.fragment,t),c(qe.$$.fragment,t),c(Ne.$$.fragment,t),c(hs.$$.fragment,t),c(Oe.$$.fragment,t),c(Se.$$.fragment,t),c(cs.$$.fragment,t),c(Re.$$.fragment,t),c(Pe.$$.fragment,t),c(Ge.$$.fragment,t),c(Ce.$$.fragment,t),c(ze.$$.fragment,t),c(Ae.$$.fragment,t),c(Ie.$$.fragment,t),c(Es.$$.fragment,t),c(Fe.$$.fragment,t),c(ks.$$.fragment,t),c(ys.$$.fragment,t),c(Le.$$.fragment,t),c(Me.$$.fragment,t),c(Be.$$.fragment,t),c(Je.$$.fragment,t),c(Ue.$$.fragment,t),c(Ve.$$.fragment,t),c(Ye.$$.fragment,t),c(We.$$.fragment,t),c(Xe.$$.fragment,t),c(Ke.$$.fragment,t),c(Qe.$$.fragment,t),c(Ze.$$.fragment,t),c(ta.$$.fragment,t),c(sa.$$.fragment,t),c(ea.$$.fragment,t),c(aa.$$.fragment,t),c(Cs.$$.fragment,t),c(na.$$.fragment,t),c(la.$$.fragment,t),c(ra.$$.fragment,t),c(As.$$.fragment,t),c(oa.$$.fragment,t),c(pa.$$.fragment,t),c(fa.$$.fragment,t),c(ua.$$.fragment,t),c(ga.$$.fragment,t),c($a.$$.fragment,t),c(va.$$.fragment,t),c(wa.$$.fragment,t),c(ja.$$.fragment,t),c(ba.$$.fragment,t),c(xa.$$.fragment,t),c(Ta.$$.fragment,t),kd=!0)},o(t){g(x.$$.fragment,t),g(A.$$.fragment,t),g(ne.$$.fragment,t),g(le.$$.fragment,t),g(re.$$.fragment,t),g(oe.$$.fragment,t),g(ie.$$.fragment,t),g(pe.$$.fragment,t),g(fe.$$.fragment,t),g(us.$$.fragment,t),g(de.$$.fragment,t),g(ue.$$.fragment,t),g(me.$$.fragment,t),g(_e.$$.fragment,t),g(ce.$$.fragment,t),g(ge.$$.fragment,t),g($e.$$.fragment,t),g(ve.$$.fragment,t),g(we.$$.fragment,t),g(Ee.$$.fragment,t),g(be.$$.fragment,t),g(xe.$$.fragment,t),g(Te.$$.fragment,t),g(De.$$.fragment,t),g(ke.$$.fragment,t),g(ye.$$.fragment,t),g(qe.$$.fragment,t),g(Ne.$$.fragment,t),g(hs.$$.fragment,t),g(Oe.$$.fragment,t),g(Se.$$.fragment,t),g(cs.$$.fragment,t),g(Re.$$.fragment,t),g(Pe.$$.fragment,t),g(Ge.$$.fragment,t),g(Ce.$$.fragment,t),g(ze.$$.fragment,t),g(Ae.$$.fragment,t),g(Ie.$$.fragment,t),g(Es.$$.fragment,t),g(Fe.$$.fragment,t),g(ks.$$.fragment,t),g(ys.$$.fragment,t),g(Le.$$.fragment,t),g(Me.$$.fragment,t),g(Be.$$.fragment,t),g(Je.$$.fragment,t),g(Ue.$$.fragment,t),g(Ve.$$.fragment,t),g(Ye.$$.fragment,t),g(We.$$.fragment,t),g(Xe.$$.fragment,t),g(Ke.$$.fragment,t),g(Qe.$$.fragment,t),g(Ze.$$.fragment,t),g(ta.$$.fragment,t),g(sa.$$.fragment,t),g(ea.$$.fragment,t),g(aa.$$.fragment,t),g(Cs.$$.fragment,t),g(na.$$.fragment,t),g(la.$$.fragment,t),g(ra.$$.fragment,t),g(As.$$.fragment,t),g(oa.$$.fragment,t),g(pa.$$.fragment,t),g(fa.$$.fragment,t),g(ua.$$.fragment,t),g(ga.$$.fragment,t),g($a.$$.fragment,t),g(va.$$.fragment,t),g(wa.$$.fragment,t),g(ja.$$.fragment,t),g(ba.$$.fragment,t),g(xa.$$.fragment,t),g(Ta.$$.fragment,t),kd=!1},d(t){e(u),t&&e(b),t&&e(j),t&&e(G),$(x,t),t&&e(k),t&&e(q),t&&e(O),$(A,t),t&&e(C),t&&e(U),t&&e(M),t&&e(T),t&&e(ae),t&&e(tt),t&&e(Ci),t&&e(bt),t&&e(zi),$(ne,t),t&&e(Ai),t&&e(xt),t&&e(Ii),$(le,t),t&&e(Hi),t&&e(Tt),t&&e(Fi),$(re,t),t&&e(Li),$(oe,t),t&&e(Mi),t&&e(nt),t&&e(Bi),t&&e(Dt),t&&e(Ji),t&&e(kt),t&&e(Ui),$(ie,t),t&&e(Vi),t&&e(yt),t&&e(Yi),$(pe,t),t&&e(Wi),$(fe,t),t&&e(Xi),$(us,t),t&&e(Ki),t&&e(Y),t&&e(Qi),$(de,t),t&&e(Zi),$(ue,t),t&&e(tp),t&&e(W),t&&e(sp),$(me,t),t&&e(ep),t&&e(ms),t&&e(ap),$(_e,t),t&&e(np),t&&e(X),t&&e(lp),$(ce,t),t&&e(rp),t&&e(za),t&&e(op),$(ge,t),t&&e(ip),$($e,t),t&&e(pp),t&&e(Aa),t&&e(fp),$(ve,t),t&&e(dp),$(we,t),t&&e(up),t&&e(qt),t&&e(mp),$(Ee,t),t&&e(_p),t&&e(Nt),t&&e(hp),$(be,t),t&&e(cp),$(xe,t),t&&e(gp),t&&e(Ia),t&&e($p),t&&e(Yt),$(Te),t&&e(vp),t&&e(Ha),t&&e(wp),t&&e(Fa),t&&e(jp),$(De,t),t&&e(Ep),t&&e(B),t&&e(bp),$(ke,t),t&&e(xp),$(ye,t),t&&e(Tp),t&&e(Ot),t&&e(Dp),$(qe,t),t&&e(kp),$(Ne,t),t&&e(yp),t&&e(La),t&&e(qp),$(hs,t),t&&e(Np),t&&e(St),t&&e(Op),$(Oe,t),t&&e(Sp),$(Se,t),t&&e(Rp),t&&e(Ma),t&&e(Pp),$(cs,t),t&&e(Gp),t&&e(gs),t&&e(Cp),$(Re,t),t&&e(zp),$(Pe,t),t&&e(Ap),t&&e($s),t&&e(Ip),$(Ge,t),t&&e(Hp),t&&e(vs),t&&e(Fp),t&&e(Wt),$(Ce),t&&e(Lp),t&&e(ht),t&&e(Mp),t&&e(K),t&&e(Bp),$(ze,t),t&&e(Jp),t&&e(Rt),t&&e(Up),t&&e(lt),t&&e(Vp),$(Ae,t),t&&e(Yp),t&&e(rt),t&&e(Wp),$(Ie,t),t&&e(Xp),t&&e(js),t&&e(Kp),$(Es,t),t&&e(Qp),t&&e(Ua),t&&e(Zp),t&&e(bs),t&&e(tf),t&&e(ot),t&&e(sf),t&&e(en),t&&e(ef),t&&e(ct),t&&e(af),$(Fe,t),t&&e(nf),t&&e(an),t&&e(lf),t&&e(xs),t&&e(rf),t&&e(Q),t&&e(of),$(ks,t),t&&e(pf),t&&e(it),t&&e(ff),$(ys,t),t&&e(df),t&&e(qs),t&&e(uf),$(Le,t),t&&e(mf),t&&e(Ns),t&&e(_f),$(Me,t),t&&e(hf),$(Be,t),t&&e(cf),t&&e(vn),t&&e(gf),$(Je,t),t&&e($f),$(Ue,t),t&&e(vf),t&&e(wn),t&&e(wf),t&&e(Z),t&&e(jf),$(Ve,t),t&&e(Ef),t&&e(jn),t&&e(bf),$(Ye,t),t&&e(xf),$(We,t),t&&e(Tf),t&&e(Pt),t&&e(Df),$(Xe,t),t&&e(kf),t&&e(Os),t&&e(yf),$(Ke,t),t&&e(qf),$(Qe,t),t&&e(Nf),t&&e(En),t&&e(Of),t&&e(Ss),t&&e(Sf),t&&e(ns),$(Ze),t&&e(Rf),$(ta,t),t&&e(Pf),t&&e(Ps),t&&e(Gf),$(sa,t),t&&e(Cf),t&&e(Gs),t&&e(zf),$(ea,t),t&&e(Af),t&&e(Gt),t&&e(Hf),t&&e(Ct),t&&e(Ff),$(aa,t),t&&e(Lf),$(Cs,t),t&&e(Mf),t&&e(zs),t&&e(Bf),$(na,t),t&&e(Jf),t&&e(zt),t&&e(Vf),t&&e(It),t&&e(Yf),$(la,t),t&&e(Wf),$(ra,t),t&&e(Xf),$(As,t),t&&e(Kf),t&&e(pt),t&&e(Qf),$(oa,t),t&&e(Zf),t&&e(ia),t&&e(td),t&&e(bn),t&&e(sd),t&&e(J),t&&e(ed),$(pa,t),t&&e(ad),$(fa,t),t&&e(nd),t&&e(xn),t&&e(ld),t&&e(da),t&&e(rd),$(ua,t),t&&e(od),t&&e(Tn),t&&e(id),t&&e(Is),t&&e(pd),t&&e(Pn),t&&e(fd),$(ga,t),t&&e(dd),t&&e(Gn),t&&e(ud),$($a,t),t&&e(md),t&&e(Cn),t&&e(_d),t&&e(Hs),t&&e(hd),$(va,t),t&&e(cd),$(wa,t),t&&e(gd),t&&e(Fs),t&&e($d),$(ja,t),t&&e(vd),t&&e(Ls),t&&e(wd),$(ba,t),t&&e(jd),$(xa,t),t&&e(Ed),t&&e(Ms),t&&e(bd),$(Ta,t),t&&e(xd),t&&e(An),t&&e(Td),t&&e(Bs),t&&e(Dd),t&&e(Fn)}}}const k4={local:"",sections:[{local:"",title:"\u5207\u7247\u4E0E\u5207\u5206\u6211\u4EEC\u7684\u6570\u636E"},{local:"creating-new-columns",title:"Creating new columns"},{local:"map",title:"map() \u65B9\u6CD5\u7684\u8D85\u7EA7\u52A0\u901F"},{local:"datasets-dataframes",title:"`\u{1F917} Datasets \u548C DataFrames \u7684\u76F8\u4E92\u8F6C\u6362"},{local:"",title:"\u521B\u5EFA\u9A8C\u8BC1\u96C6"},{local:"",title:"\u4FDD\u5B58\u6570\u636E\u96C6"}],title:"\u662F\u65F6\u5019\u6765\u5B66\u4E00\u4E0B\u5207\u7247\u4E86"};function y4(z){return c4(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class C4 extends u4{constructor(u){super();m4(this,u,y4,D4,_4,{})}}export{C4 as default,k4 as metadata};
