我正在尝试将大型DataFrame导出为传统的CSV,而当我使用方法to_csv时,我得到以下格式:
ConcatIndex,FileID,FileName,ID,Tag,Level,Sublevels,Parent,Parent ID,Children,Descendants,Attributes,Attribute Array,Characters,Words,URLs,URL Array,Diferent URL Domains,Diferent URL SubDomains,Diferent URL Suffixes,Diferent URL Full Domains,Relevant,Relevant for Headline,Relevant for Body,Content,Real Content,Real Characters,Real Words,Real URLs,Real URL Array,Real Diferent URL Domains,Real Diferent URL SubDomains,Real Diferent URL Suffixes,Real Diferent URL Full Domains,<a>,<abbr>,<acronym>,<address>,<applet>,<area>,<article>,<aside>,<audio>,<b>,<base>,<basefont>,<bdi>,<bdo>,<big>,<blockquote>,<body>,<br>,<button>,<canvas>,<caption>,<center>,<cite>,<code>,<col>,<colgroup>,<datalist>,<dd>,<del>,<details>,<dfn>,<dialog>,<dir>,<div>,<dl>,<dt>,<em>,<embed>,<fieldset>,<figcaption>,<figure>,<font>,<footer>,<form>,<frame>,<frameset>,<h1>,<h2>,<h3>,<h4>,<h5>,<h6>,<head>,<header>,<hgroup>,<hr>,<html>,<i>,<iframe>,<img>,<input>,<ins>,<kbd>,<keygen>,<label>,<legend>,<li>,<link>,<main>,<map>,<mark>,<menu>,<menuitem>,<meta>,<meter>,<nav>,<noframes>,<noscript>,<object>,<ol>,<optgroup>,<option>,<output>,<p>,<param>,<pre>,<progress>,<q>,<rp>,<rt>,<ruby>,<s>,<samp>,<script>,<section>,<select>,<small>,<source>,<span>,<strike>,<strong>,<style>,<sub>,<summary>,<sup>,<table>,<tbody>,<td>,<textarea>,<tfoot>,<th>,<thead>,<time>,<title>,<tr>,<track>,<tt>,<u>,<ul>,<var>,<video>,<wbr>,<a>Parent,<abbr>Parent,<acronym>Parent,<address>Parent,<applet>Parent,<area>Parent,<article>Parent,<aside>Parent,<audio>Parent,<b>Parent,<base>Parent,<basefont>Parent,<bdi>Parent,<bdo>Parent,<big>Parent,<blockquote>Parent,<body>Parent,<br>Parent,<button>Parent,<canvas>Parent,<caption>Parent,<center>Parent,<cite>Parent,<code>Parent,<col>Parent,<colgroup>Parent,<datalist>Parent,<dd>Parent,<del>Parent,<details>Parent,<dfn>Parent,<dialog>Parent,<dir>Parent,<div>Parent,<dl>Parent,<dt>Parent,<em>Parent,<embed>Parent,<fieldset>Parent,<figcaption>Parent,<figure>Parent,<font>Parent,<footer>Parent,<form>Parent,<frame>Parent,<frameset>Parent,<h1>Parent,<h2>Parent,<h3>Parent,<h4>Parent,<h5>Parent,<h6>Parent,<head>Parent,<header>Parent,<hgroup>Parent,<hr>Parent,<html>Parent,<i>Parent,<iframe>Parent,<img>Parent,<input>Parent,<ins>Parent,<kbd>Parent,<keygen>Parent,<label>Parent,<legend>Parent,<li>Parent,<link>Parent,<main>Parent,<map>Parent,<mark>Parent,<menu>Parent,<menuitem>Parent,<meta>Parent,<meter>Parent,<nav>Parent,<noframes>Parent,<noscript>Parent,<object>Parent,<ol>Parent,<optgroup>Parent,<option>Parent,<output>Parent,<p>Parent,<param>Parent,<pre>Parent,<progress>Parent,<q>Parent,<rp>Parent,<rt>Parent,<ruby>Parent,<s>Parent,<samp>Parent,<script>Parent,<section>Parent,<select>Parent,<small>Parent,<source>Parent,<span>Parent,<strike>Parent,<strong>Parent,<style>Parent,<sub>Parent,<summary>Parent,<sup>Parent,<table>Parent,<tbody>Parent,<td>Parent,<textarea>Parent,<tfoot>Parent,<th>Parent,<thead>Parent,<time>Parent,<title>Parent,<tr>Parent,<track>Parent,<tt>Parent,<u>Parent,<ul>Parent,<var>Parent,<video>Parent,<wbr>Parent,<a>child,<abbr>child,<acronym>child,<address>child,<applet>child,<area>child,<article>child,<aside>child,<audio>child,<b>child,<base>child,<basefont>child,<bdi>child,<bdo>child,<big>child,<blockquote>child,<body>child,<br>child,<button>child,<canvas>child,<caption>child,<center>child,<cite>child,<code>child,<col>child,<colgroup>child,<datalist>child,<dd>child,<del>child,<details>child,<dfn>child,<dialog>child,<dir>child,<div>child,<dl>child,<dt>child,<em>child,<embed>child,<fieldset>child,<figcaption>child,<figure>child,<font>child,<footer>child,<form>child,<frame>child,<frameset>child,<h1>child,<h2>child,<h3>child,<h4>child,<h5>child,<h6>child,<head>child,<header>child,<hgroup>child,<hr>child,<html>child,<i>child,<iframe>child,<img>child,<input>child,<ins>child,<kbd>child,<keygen>child,<label>child,<legend>child,<li>child,<link>child,<main>child,<map>child,<mark>child,<menu>child,<menuitem>child,<meta>child,<meter>child,<nav>child,<noframes>child,<noscript>child,<object>child,<ol>child,<optgroup>child,<option>child,<output>child,<p>child,<param>child,<pre>child,<progress>child,<q>child,<rp>child,<rt>child,<ruby>child,<s>child,<samp>child,<script>child,<section>child,<select>child,<small>child,<source>child,<span>child,<strike>child,<strong>child,<style>child,<sub>child,<summary>child,<sup>child,<table>child,<tbody>child,<td>child,<textarea>child,<tfoot>child,<th>child,<thead>child,<time>child,<title>child,<tr>child,<track>child,<tt>child,<u>child,<ul>child,<var>child,<video>child,<wbr>child,<a>desc,<abbr>desc,<acronym>desc,<address>desc,<applet>desc,<area>desc,<article>desc,<aside>desc,<audio>desc,<b>desc,<base>desc,<basefont>desc,<bdi>desc,<bdo>desc,<big>desc,<blockquote>desc,<body>desc,<br>desc,<button>desc,<canvas>desc,<caption>desc,<center>desc,<cite>desc,<code>desc,<col>desc,<colgroup>desc,<datalist>desc,<dd>desc,<del>desc,<details>desc,<dfn>desc,<dialog>desc,<dir>desc,<div>desc,<dl>desc,<dt>desc,<em>desc,<embed>desc,<fieldset>desc,<figcaption>desc,<figure>desc,<font>desc,<footer>desc,<form>desc,<frame>desc,<frameset>desc,<h1>desc,<h2>desc,<h3>desc,<h4>desc,<h5>desc,<h6>desc,<head>desc,<header>desc,<hgroup>desc,<hr>desc,<html>desc,<i>desc,<iframe>desc,<img>desc,<input>desc,<ins>desc,<kbd>desc,<keygen>desc,<label>desc,<legend>desc,<li>desc,<link>desc,<main>desc,<map>desc,<mark>desc,<menu>desc,<menuitem>desc,<meta>desc,<meter>desc,<nav>desc,<noframes>desc,<noscript>desc,<object>desc,<ol>desc,<optgroup>desc,<option>desc,<output>desc,<p>desc,<param>desc,<pre>desc,<progress>desc,<q>desc,<rp>desc,<rt>desc,<ruby>desc,<s>desc,<samp>desc,<script>desc,<section>desc,<select>desc,<small>desc,<source>desc,<span>desc,<strike>desc,<strong>desc,<style>desc,<sub>desc,<summary>desc,<sup>desc,<table>desc,<tbody>desc,<td>desc,<textarea>desc,<tfoot>desc,<th>desc,<thead>desc,<time>desc,<title>desc,<tr>desc,<track>desc,<tt>desc,<u>desc,<ul>desc,<var>desc,<video>desc,<wbr>desc,Attribute<hidden>,Attribute<high>,Attribute<href>,Attribute<hreflang>,Attribute<http-equiv>,Attribute<icon>,Attribute<id>,Attribute<ismap>,Attribute<itemprop>,Attribute<keytype>,Attribute<kind>,Attribute<label>,Attribute<lang>,Attribute<language>,Attribute<list>,Attribute<loop>,Attribute<low>,Attribute<manifest>,Attribute<max>,Attribute<maxlength>,Attribute<media>,Attribute<method>,Attribute<min>,Attribute<multiple>,Attribute<name>,Attribute<novalidate>,Attribute<open>,Attribute<optimum>,Attribute<pattern>,Attribute<ping>,Attribute<placeholder>,Attribute<poster>,Attribute<preload>,Attribute<pubdate>,Attribute<radiogroup>,Attribute<readonly>,Attribute<rel>,Attribute<required>,Attribute<reversed>,Attribute<rows>,Attribute<rowspan>,Attribute<sandbox>,Attribute<spellcheck>,Attribute<scope>,Attribute<scoped>,Attribute<seamless>,Attribute<selected>,Attribute<shape>,Attribute<size>,Attribute<sizes>,Attribute<span>,Attribute<src>,Attribute<srcdoc>,Attribute<srclang>,Attribute<srcset>,Attribute<start>,Attribute<step>,Attribute<style>,Attribute<summary>,Attribute<tabindex>,Attribute<target>,Attribute<title>,Attribute<type>,Attribute<usemap>,Attribute<value>,Attribute<width>,Attribute<wrap>,Attribute<border>,Attribute<buffered>,Attribute<challenge>,Attribute<charset>,Attribute<checked>,Attribute<cite>,Attribute<class>,Attribute<code>,Attribute<codebase>,Attribute<color>,Attribute<cols>,Attribute<colspan>,Attribute<content>,Attribute<contenteditable>,Attribute<contextmenu>,Attribute<controls>,Attribute<coords>,Attribute<data>,Attribute<data-*>,Attribute<datetime>,Attribute<default>,Attribute<defer>,Attribute<dir>,Attribute<dirname>,Attribute<disabled>,Attribute<download>,Attribute<draggable>,Attribute<dropzone>,Attribute<enctype>,Attribute<for>,Attribute<form>,Attribute<formaction>,Attribute<headers>,Attribute<height>,Attribute<accept>,Attribute<accept-charset>,Attribute<accesskey>,Attribute<action>,Attribute<align>,Attribute<alt>,Attribute<async>,Attribute<autocomplete>,Attribute<autofocus>,Attribute<autoplay>,Attribute<autosave>,Attribute<bgcolor>,Concatenated String Index,ConcatIndex
0,0,./dataset_html/diario_digital/428001.html,0,html,0,17,[document],,4,1477,1,['xmlns'],10926,1492,60,"['http://www.w3.org/1999/xhtml', 'http://www.diariodigital.pt', 'http://www.google-analytics.com/urchin.js', 'http://ads.sapo.pt/js.ng/site=diariodigital&', 'http://www.diariodigital.pt/dinheiro_digital/news.asp?id_news=132358', 'http://www.diariodigital.pt/dinheiro_digital/news.asp?id_news=132356', 'http://www.diariodigital.pt/dinheiro_digital/news.asp?id_news=132353', 'http://www.diariodigital.pt/disco_digital/news.asp?id_news=37701', 'http://www.diariodigital.pt/disco_digital/news.asp?id_news=37693', 'http://www.diariodigital.pt/disco_digital/news.asp?id_news=37694', 'http://ads.sapo.pt/js.ng/site=diariodigital&chan=diariodigital&adsize=300x250&type=mrec&pos=2&TileID=', 'http://diariodigital.sapo.pt/disco_digital/news.asp?id_news=37694', 'http://diariodigital.sapo.pt/disco_digital/news.asp?id_news=37383', 'http://ads.sapo.pt/js.ng/site=diariodigital&chan=diariodigital&adsize=300x250&type=mrec&pos=1&TileID=', 'http://ads.sapo.pt/js.ng/site=diariodigital&chan=diariodigital&adsize=300x100&type=banner&pos=2&TileID=', 'http://diariodigital.sapo.pt/news.asp?section_id=83&', 'http://diariodigital.sapo.pt/news.asp?section_id=83&', 'http://diariodigital.sapo.pt/horoscopo.asp', 'http://diariodigital.sapo.pt/new/news.asp?section_id=33&', 'http://diariodigital.sapo.pt/section.asp?section_id=138', 'http://diariodigital.sapo.pt/section.asp?section_id=185', 'http://diariodigital.sapo.pt/section.asp?section_id=185', 'http://diariodigital.sapo.pt/section.asp?section_id=185', 'http://diariodigital.sapo.pt/news.asp?section_id=126&', 'http://diariodigital.sapo.pt/news.asp?section_id=126&', 'http://www.diariodigital.pt/section.asp?section_id=65', 'http://www.diariodigital.pt/news.asp?section_id=78&', 'http://www.anf.pt/', 'http://www.estradasdeportugal.pt/site/v3/?id_pagina=&', 'http://www.diariodigital.pt/section.asp?section_id=91', 'http://www.diariodigital.pt/news.asp?section_id=43&', 'http://www.diariodigital.pt/news.asp?section_id=43&', 'http://www.diariodigital.pt/news.asp?section_id=43&', 'http://www.diariodigital.pt/news.asp?section_id=43&', 'http://www.diariodigital.pt/news.asp?section_id=43&', 'http://www.diariodigital.pt/news.asp?section_id=43&', 'http://www.diariodigital.pt/news.asp?section_id=43&', 'http://www.diariodigital.pt/news.asp?section_id=43&', 'http://diariodigital.sapo.pt/news.asp?section_id=43&', 'http://diariodigital.sapo.pt/news.asp?section_id=43&', 'http://diariodigital.sapo.pt/news.asp?section_id=33&', 'http://diariodigital.sapo.pt/news.asp?id_news=324642', 'http://diariodigital.sapo.pt/news.asp?section_id=50&', 'http://diariodigital.sapo.pt/news.asp?section_id=50&', 'http://diariodigital.sapo.pt/news.asp?section_id=50&', 'http://diariodigital.sapo.pt/news.asp?section_id=89&', 'http://diariodigital.sapo.pt/news.asp?section_id=89&', 'http://diariodigital.sapo.pt/news.asp?section_id=89&', 'http://diariodigital.sapo.pt/news.asp?section_id=89&', 'http://diariodigital.sapo.pt/news.asp?section_id=89&', 'http://diariodigital.sapo.pt/news.asp?id_news=226037', 'http://www.askmelisboa.com', 'http://www.portugaldigital.com.br', 'http://diariodigital.sapo.pt/banner.swf', 'http://www.jtm.com.mo/', 'http://diariodigital.sapo.pt/news.asp?section_id=33&', 'http://diariodigital.sapo.pt/news.asp?section_id=33&', 'http://ads.sapo.pt/js.ng/site=diariodigital&chan=diariodigital&adsize=1x1&type=richmedia&', 'http://bars.sapo.pt/bsu_v1.1/barra.js?site=diariodigital&', 'http://js.sl.pt/Netscope/']",440,460,131,1151,0,0,0,"Diário Digital @import url(includes/calendar/skins/aqua/theme.css); function SetHomepage() { document.body.style.behavior='url(#default#homepage)'; document.body.setHomePage('http://www.diariodigital.pt'); } _uacct = ""UA-195558-1""; urchinTracker(); /* v1.1 */ .bsu_almofada {clear: both;margin-bottom: 1.4em;overflow: hidden;height: 1px;font-size: 16px;} var TileID = Math.floor(Math.random()*10000); TileID=Math.floor(Math.random()*100000); Director: Pedro Curvelo Pesquise no DD em Todas as secções.. Sociedade Política Mundo Desporto Auto-Digital Cultura Ambiente Saúde Pessoas TV e Cinema Multimédia Informática Torne o DD a sua homepageterça-feira, 23 de Fevereiro de 2010 | 14:55 MUNDO POLÍTICA SOCIEDADE AMBIENTE SAÚDE PESSOAS ECONOMIA DESPORTO CULTURA TV E CINEMA MULTIMÉDIA INFORMÁTICA MÚSICA Outros artigos desta secção terça-feira, 29 de Dezembro de 2009 | 12:36 Imprimir Enviar por Email Polícia alemã testa scanner corporal para segurança aérea A Polícia alemã está a testar há um ano e meio os sistemas de scanner corporal para optimizar a segurança aérea, informaram hoje fontes policiais, depois de, nos últimos dias, terem aumentado os controlos dos passageiros com destino aos EUA. Os testes acontecem a portas fechadas, em dependências policiais de Lübeck (norte do país), e, até ao momento, não foi elaborado nenhum relatório sobre a sua eficiência nem estabelecido quanto tempo durarão as provas, acrescentou essa fonte. As autoridades alemãs, assim como outros países europeus e do resto do mundo, aumentaram o esquema de segurança e controlo dos viajantes para os EUA, após a tentativa de atentado realizada por um nigeriano num avião que fazia a ligação entre Amesterdão e Detroit. Os passageiros com destino aos EUA devem apresentar-se nos aeroportos antes do habitual, mas essas medidas provocaram alguns atrasos nas descolagens dos voos. A tentativa de atentado no avião com destino a Detroit abriu um debate na Alemanha sobre a segurança aérea, enquanto alguns especialistas advertem que esta não pode ficar 100% garantida nem mesmo com scanner corporal, que também representa uma restrição do direito à privacidade. CONTINUA ... function abrirjanela(theurl) { window.open(theurl,'print',""toolbar=no,location=no,directories=no,status=no,menubar=0,scrollbars=no,resizable=no,copyhistory=no,width=615,height=400""); } function abrirjanelaFriend(theurl) { window.open(theurl,'EnviarAmigo',""toolbar=no,location=no,directories=no,status=no,menubar=0,scrollbars=no,resizable=no,copyhistory=no,width=242,height=180""); } Canais Diário Digital OE2010: BE quer taxar a 25% transferências para off-shoresWall Street inicia sessão com ligeiras quedasFrente Comum desconvoca greve de 4 de Março na Madeira The National no Super Bock Super RockAgenda de concertos 23 de FevereiroPassatempo: A Dama de Copas e o Rei de Cuba // <![CDATA[ var so = new SWFObject(""images_banner/Tivoli-mrec.swf"", ""pub825"", ""300"", ""250"", ""9"", """"); so.write(""flashcontent825""); // ]]> & vbcrlf document.write ('<SCR' + 'IPT SRC=""http://ads.sapo.pt/js.ng/site=diariodigital&chan=diariodigital&adsize=300x250&type=mrec&pos=2&TileID='+TileID+'""></SCR' + 'IPT>'); PassatempoDama de Copas e o Rei de Cuba Acerto de Contas Mundover maisPolíticaver maisSarkozy nomeia socialista para o Tribunal de ContasFarc atacam sedes de partidos na ColômbiaIrão: Ahmadinejad promete cortar mãos de agressores Holanda: Legislativas antecipadas marcadas para 9 de JunhoCarro armadilhado explode na Irlanda do NorteIrão disposto a comprar ou trocar combustível nuclear Secretário de Estado João Correia critica Cândida AlmeidaZapatero e Durão Barroso prometem apoio à MadeiraBE propõe fim dos benefícios fiscais para PPRFrente Comum desconvoca greve de 4 de Março na MadeiraDirector do Sol pede adiamento da audição parlamentarAR aprova deliberação de solidariedade com a Madeira Sociedadever maisEconomiaver maisProvedor de Justiça recomenda alteração de dois diplomasMadeira: Bispo do Funchal presidiu ao primeiro funeralSMMP «estupefacto» com declarações de Cândida AlmeidaMetro do Porto contesta providência cautelar ao concursoMadeira: Governo reduz para 13 número de desaparecidosInternamento de Valentim Loureiro adia debate instrutórioOE2010: BE quer taxar a 25% transferências para off-shoresWall Street inicia sessão com ligeiras quedasBanif recorre a tribunal para recuperar 13 M€ nos AçoresLufthansa cancela voos apesar de suspensão da greve pilotosBrasil: BRIC são a «tropa de elite da economia mundial»FMI: Fim dos apoios à economia deve ser «concertado»Saúdever maisPessoasver maisCascais: 50 manifestantes protestam frente ao novo hospitalCientistas criam mosquito transgénico para conter dengueNovo Hospital de Cascais é hoje inauguradoMenos de metade dos portugueses foram ao dentista em 2009Instituto Macrobiótico promove workshop de geobiologiaEstudo vai inquirir doentes sobre morte assistidaNicole Scherzinger e Lewis Hamilton reconciliam-seJennifer Lopez deixa Sony Music e atrasa novo CDHaiti: Vestido de Britney Spears rende 5.878 eurosLindsay Lohan admite abuso de drogasFerrán Adriá anuncia fundação no Restaurante elBulli em 2014América Latina: Shakira lança fundo para a infânciaDesportover maisCulturaver maisSporting: Moutinho informou-se sobre o interesse do ZenitSp. Braga promete abrir as portas do estádio com o OlhanenseFC Porto: Fernando com rotura muscularI Liga: Leixões e Wires lideram nas faltas cometidasI Liga: FC Porto e Hulk lideram perdas de bolaI Liga: William é o que mais «cai» em fora de jogoSiza Vieira entre 200 criadores para «vazio» do Guggenheim SLTM acolhe Semana da Cultura Açoriana de 2 a 7 de Março*Veja programa no interior...Coimbra: Eduardo Pitta na livraria Almedina Estádio dia 25Braga: Theatro Circo acolhe «niewZwart» dia 28 de FevereiroGastronomia de Macau em destaque no MdO em MarçoCiclo «Grandes Pianistas» abre dia 26 com Artur PizarroTV e Cinemaver maisAmbientever maisNGC estreia «Caçadores de Cabeças da II Guerra» em MarçoOwen Wilson protagonizará próximo filme de Woody AllenEUA vai produzir série inspirada em conta do TwitterMichael Jackson: «Captain EO» volta a ser exibido na DisneyShia LaBeauf aprende a jogar na Bolsa para «Wall Street 2»Taylor Lautner protagonizará «Abduction»Vento arranca 300 azinheiras centenárias em Nisa e CratoNovo Aeroporto: Medidas de minimização custarão até 150 M€Aviação: OACI fixa 2013 como meta para criar norma sobre CO2Navios deixam 135 toneladas de lixo no FunchalHora do Planeta: Lisboa e Faro às escuras dia 27 de MarçoBaleias: Austrália ameaça avançar com acção contra JapãoInformática e Multimédiaver maisMúsicaver mais«SOS Madeira» reúne 30 mil membros no FacebookNova Iorque: Apple Store acolhe casamento entre nerdsAmazon e Microsoft assinam acordo para partilhar patentes Timor Telecom muda imagem e anuncia rede 3GFacebook eleita a empresa mais inovadora do mundo Grupo Renascença reorganizado em «r/com Multimédia» The National no Super Bock Super RockPassatempo: A Dama de Copas e o Rei de CubaA Silent Film regressam a PortugalSuper Bock Super Rock muda-se para o MecoMotorhead no Rock In Rio document.write ('<SCR' + 'IPT SRC=""http://ads.sapo.pt/js.ng/site=diariodigital&chan=diariodigital&adsize=300x250&type=mrec&pos=1&TileID='+TileID+'""></SCR' + 'IPT>'); document.write ('<SCR' + 'IPT SRC=""http://ads.sapo.pt/js.ng/site=diariodigital&chan=diariodigital&adsize=300x100&type=banner&pos=2&TileID='+TileID+'""></SCR' + 'IPT>'); TempoMercados Clique para aceder ao ticker function popW(){window.open(""ddTik.asp"",""Ticker"",""toolbar=no,location=no,directories=no,status=no,menubar=0,scrollbars=1,resizable=no,copyhistory=no,width=520,height=100"")}PSI20 -43.4 7,690.93 -0.56 HoróscopoNewsletterAUTO-DIGITALAPRESENTAÇÃO NACIONALChevrolet Spark LIVROS«O Terceiro Reich»: 1º capítuloDepois de «2666», a Quetzal edita mais uma obra do chileno Roberto Bolaño, «O Terceiro Reich», que terá lançamento oficial durante as Correntes d´Escritas na próxima quinta-feira. Portugal será o segundo país a nível mundial a ver editado o livro póstumo de Bolãno.Mundial 2010Calendário do Mundial 201015/06: Costa do Marfim-PORTUGAL 21/06: PORTUGAL-Coreia do Norte 25/06: PORTUGAL-BrasilUtilidadesEscolha uma opção...Agenda do DiaDiário da RepúblicaFarmáciasEP - TrânsitoProgramação TVImprensa do DiaEscolha uma opção...Diário de NotíciasPúblicoExpressoDiário EconómicoA BolaRecordO JogoFinancial TimesSolJornal de NegóciosServiçosEscolha uma opção...RSSSMSWAP / PDATicker NotíciasNewsLetterE-DiárioChatWebmailSondagemSócrates continua a ter condições para governar?SimNão <!-- function CheckVote(theOption) { check = false; for (i=0;i<25;i++) { if (theOption.answer[i]) { if (theOption.answer[i].checked) { window.open('','Result',""toolbar=no,location=no,directories=no,status=no,menubar=0,scrollbars=no,resizable=no,copyhistory=no,width=270,height=270""); check=true; break; } } else break; } if (check==false) alert(""Por favor selecione uma opção para votar""); return check; } // --> Opinião Digital«Ética: mais do mesmo?»Dom Vasco Teles da Gama«Quando é que se indignam?»Fátima Moura da Silva«Com Papas e Bolos »João Mattos e SilvaCinemaESTREIAS A 18 DE FEVEREIRO«O Lobisomem» «An Education» «Bobby Cassidy: Counterpuncher» «Um Homem Sério» «Um Homem Singular» // <![CDATA[ var so = new SWFObject(""http://diariodigital.sapo.pt/banner.swf"", ""pub0001"", ""120"", ""130"", ""9"", """"); so.write(""flashcontent""); // ]]> Copyright Diário Digital 1999/2010 Av. da Liberdade, nº13 - 3ºEsq. 1250-139 LisboaTelefone: 21.359.31.00 | Fax: 21.359.31.31Propriedade: Caneta Electrónica - Edições Multimédia , SAEmpresa jornalística: 223 356 * Registo de título: 123 357Membro da Associação Portuguesa de Imprensa Ficha Técnica | Estatuto editorial | E-mail document.write ('<SCR' + 'IPT SRC=""http://ads.sapo.pt/js.ng/site=diariodigital&chan=diariodigital&adsize=1x1&type=richmedia& TileID='+TileID+'""></SCR' + 'IPT>'); var WRP_ID= 312223; var WRP_SECTION_GRP='Noticias'; var WRP_SUBSECTION_GRP= 'Diario Digital (312223)'; var WRP_CONTENT='Home content'; var WRP_CHANNEL; var WRP_SECTION=''; var WRP_SUBSECTION=''; WRP_SECTION='Homepage'; WRP_SUBSECTION='Artigo'; webo_ok=0; /* Profondeur Frame */ var WRP_ACC ; wreport_ok=0; if(wreport_ok==1){ var w_counter = new wreport_counter(WRP_SECTION, WRP_SUBSECTION, WRP_ID, WRP_ACC, WRP_CHANNEL, WRP_SECTION_GRP, WRP_SUBSECTION_GRP); w_counter.add_content(WRP_CONTENT); w_counter.count();}",,0,0,0,[[]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,153,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,1,202,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,4,0,5,0,0,0,0,0,0,0,0,1,0,0,17,0,6,1,155,11,0,0,0,1,0,0,1,0,0,0,0,0,3,0,0,0,0,0,0,0,39,0,7,0,0,0,0,0,0,0,0,0,21,0,4,0,0,1,0,0,2,0,0,0,62,0,179,0,0,0,0,0,1,98,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"ID
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 10
11 11
12 12
13 13
14 14
...
1005 1005
1006 1006
1007 1007
1008 1008
1009 1009
1010 1010
1011 1011
1012 1012
1013 1013
1014 1014
1015 1015
1016 1016
1017 1017
1018 1018
1019 1019
Length: 1020, dtype: int64",0
...
2200976,22,./dataset_html/diario_digital/4446001.html,976,br,6,0,td,973.0,0,0,0,[],0,0,0,[],0,0,0,0,0,0,0,,,0,0,0,[[]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"ID
0 2200000
1 2200001
2 2200002
3 2200003
4 2200004
5 2200005
6 2200006
7 2200007
8 2200008
9 2200009
10 2200010
11 2200011
12 2200012
13 2200013
14 2200014
...
977 2200977
978 2200978
979 2200979
980 2200980
981 2200981
982 2200982
983 2200983
984 2200984
985 2200985
986 2200986
987 2200987
988 2200988
989 2200989
990 2200990
991 2200991
Length: 992, dtype: int64",2200976
输入是一对(> 3000)混合数据数据帧(大数据),我无法在这里复制,甚至不能复制一行。
我使用的代码摘录如下:
for picklefile in pickleFiles:
if count%100 == 0:
t2 = datetime.now()
print(str(t2))
print('count = ' + str(count))
print('time: ' + str(t2 - t1) + '\n')
t1 = t2
#DataFrame Manipulation:
df = pd.read_pickle(path + picklefile)
df['Concatenated String Index'] = str(100000*df.FileID + df.ID).zfill(10)
df['ConcatIndex'] = 100000*df.FileID + df.ID
df.index = df.ConcatIndex
#DataFrame Normalization:
#TODO: Cycle that normalizes every column in each DataFrame...
#Saving DataFrame in different formats:
df.to_pickle(path + "Normalized/Pickle/" + picklefile)
df.to_csv(path + 'Normalized/CSV/' + picklefile.strip('.p') + '.csv')
if picklefile == '0000.p':
f = open('teste.txt', 'w')
f.write(pd.DataFrame.to_string(df))
f.close
df.to_csv(finalnormCSVFile)
else:
df.to_csv(finalnormCSVFile, mode='a', header=False)
count += 1
所需输出,基本csv格式如下:
Index, head1, head2, head3, ...
0, value1, value2, value3, ...
1, value1, value2, value3, ...
2, value1, value2, value3, ...
3, value1, value2, value3, ...
4, value1, value2, value3, ...
...
etc.
如何更改此设置并获得完整的基于行的csv输出?
答案 0 :(得分:1)
这部分剧本似乎正在造成所有伤害:
#DataFrame Manipulation:
df = pd.read_pickle(path + picklefile)
-> df['Concatenated String Index'] = str(100000*df.FileID + df.ID).zfill(10)
df['ConcatIndex'] = 100000*df.FileID + df.ID
df.index = df.ConcatIndex
当将这些索引转换为字符串时,它返回整个转换索引的字符串,以及它出现奇怪的原因。将该行代码转换为每个循环的代码并运行良好。