简体   繁体   English

使用python将内容写入Excel

[英]Writing content into a Excel using python

I have extracted the data from the page,using selenium python http://www.cmdgroup.com/construction-projects/project/1001622072我已经从页面中提取了数据,使用 selenium python http://www.cmdgroup.com/construction-projects/project/1001622072

Here is the Extracted Data looks like,这是提取的数据看起来像,

Location:
Larkspur, CA
Status:
Postbids Unavailable, BIDS: 05/10/2012
Value:
$ 75,000.00
Documents:
Available with subscription
Categories
Offices
Subbid/Pkg:
GCs Request Subbids On Select Trades: Gutter, Deck Waterproofing & Window Installation
Scope:
Office Scope of work includes: Removal of existing Dex-O-Tex Weatherwear waterproofing system, sheet metal flashing at interior and exterior perimeter of deck, along with wood siding and trim in areas affected by work; Removal and re-installation of exist
Notes:
1. NO CALLS To Owner/Architect. Please Direct Project Inquiries To Bidding GCs Only. 2. SD Deacon Requests Project Inquiries & Bids To Malcolm McFarland At (916)969-0900, Fax (916)735-0800 Or malcolm.mcfarland@deacon.com 3. Please Note There Will Be A Pre
Details:
[Division 3]: Concrete Restoration & Cleaning. [Division 6]: Rough Carpentry, Finish Carpentry. [Division 7]: Waterproofing. [Division 8]: Metal Windows. [Division 9]: Painting. [Division 15]: Plumbing Piping.
Contract Conditions:
Invited Bidders Only

I want this data to write into a Excel File,using python我希望使用 python 将此数据写入 Excel 文件

Headers标题

Location,Status,BIDS,Value,Categories,Subbid/Pkg,Scope,Notes,Details,Contract Conditions位置、状态、投标、价值、类别、投标/包装、范围、注意事项、详细信息、合同条件

"Larkspur, CA","Postbids Unavailable",05/10/12,"$ 75,000.00",Offices,"GCs Request Subbids On Select Trades:
 Gutter, Deck Waterproofing & Window Installation","Office Scope of work includes: Removal of existing Dex-O-Tex Weatherwear waterproofing system, 
sheet metal flashing at interior and exterior perimeter of deck, along with wood siding 
And trim in areas affected by work; Removal and re-installation of exist","1. NO CALLS To Owner/Architect. Please Direct Project Inquiries To Bidding GCs Only. 2. SD Deacon Requests Project Inquiries & Bids To Malcolm McFarland At (916)969-0900, Fax (916)735-0800 Or malcolm.mcfarland@deacon.com 3. Please Note There Will Be A Pre","[Division 3]: Concrete Restoration & Cleaning. [Division 6]: Rough Carpentry, Finish Carpentry. [Division 7]: Waterproofing. [Division 8]: Metal Windows. [Division 9]: Painting. [Division 15]: Plumbing Piping.","Invited Bidders Only"

Thanks in advance.提前致谢。

If you can convert your data type to anything that looks remotely like a 2D array or a list of lists, you can create a pandas dataframe out of it and use the to_excel() method.如果您可以将您的数据类型转换为任何看起来像二维数组或列表列表的东西,您可以从中创建一个to_excel()数据to_excel()并使用to_excel()方法。 To help you further though, we need to know more about the structure of your data, not just how it looks when it's formatted and printed.不过,为了进一步帮助您,我们需要更多地了解您的数据结构,而不仅仅是它在格式化和打印时的外观。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM