简体   繁体   中英

Creating an Excel data sheet from big csv file using python (or other)

At my job we are working with a huge set of data of real estate properties compacted in a csv file of around 200000 lines (constantly growing).

This csv sheet includes columns with info such as: pricing, surface area, year built, street, street nr, post code, etc.

Part of the work we are doing includes creating an Excel sheet of properties that are comparable to a given object within a set of certain limits (eg surface area +/- 20%).

I want to automate generating such an Excel list and I was thinking about using Python for this. Here is what I want the program to do:

1) Read in the csv file

2) Take in all necessary parameters to be compared for the Excel sheet

3) Create an excel sheet from the csv data with properties that fit these parameters

4) Rewrite abstract parameter descriptions (eg if the value of column 'dishwasher' is '0', write 'No dishwasher available') and append the value in the house_number column to the street_name column value

Is python a good way for handling this or would you have other suggestions?

Python is a good language to do data parsing like this. Using the pandas library might be helpful. It has functions for importing CSVs and functions to operate on the resulting data. Pandas can also directly export into the excel format .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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