Excel VBA and Python pandas libraries are compared in processing Excel, data loop nesting queries.

Source: Internet
Author: User

The most by a friend set up a part-time operation of the company, but the need for some part-time staff pay, but due to a part-time wage between the 40~60, so the company adopted the principle is more than 200 to carry out, this rule is equivalent to drop the driver, the withdrawal needs more than 200, Then the problem came, in order to better let a large number of part-time staff can, clearly understand the time period in which they earn a lot of money, this time extended a problem, we need to pay for the period to find, when I think of the use of VBA and XLRD library data processing and comparison let him solve the problem, and finally complete the task, deepened the relationship between the brothers.

Is the result of the query we need.

First we use VBA for quick processing.


Sub Time Query ()
Dim a!, b!
c = 136
For a = 3 to 40
For b = 5 to C
If Sheet2.cells (A, B) > 0 Then
Sheet2.cells (A, c + 1) = Sheet2.cells (2, B)
Exit for
End If
Next

Sheet2.cells (A, C + 2) = Sheet2.cells (2, C)
Next

End Sub

And then we're dealing with the pandas.

Excel VBA and Python pandas libraries are compared in processing Excel, data loop nesting queries.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.