使用python将内容写入Excel

时间:2018-02-09 03:18:54

标签: python excel

我使用selenium python从页面中提取数据 http://www.cmdgroup.com/construction-projects/project/1001622072

以下是提取的数据,

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

我希望使用python

将这些数据写入Excel文件

接头

位置,状态,BIDS,价值,类别,Subbid / Pkg,范围,注释,详细信息,合同条件

"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"

提前致谢。

1 个答案:

答案 0 :(得分:0)

如果您可以将数据类型转换为远程类似于2D数组或列表列表的任何内容,则可以从中创建一个pandas数据框并使用to_excel() method.为了进一步帮助您,我们需要了解数据结构的更多信息,而不仅仅是格式化和打印时的外观。