Learn Python plans and impressions from scratch

Source: Internet
Author: User

The technical consultants who have transformed from pure traditional bi have the advantage of being familiar with the business, sensitive to the data, and familiar with the data model. But it's all about using SQL to deal with problems over the ages. There is no SQL can not solve the problem, a SQL can not solve the use of temporary tables, a few SQL solution (laughter). Although not the best implementation. But we can still cope with it, but can't we stop it now? Integration This period of time the project is free, so I studied the use of Python to write UDFs. Why Python?? Because I don't have Java, Python is relatively easy to learn. And Python learns, can also engage in reptiles, engage in machine learning. Of course, there will be some later. These Python UDFs are ready to be converted into Java code. After all, the technology must be full, but also refined ah.

Using Python to write UDFs, I am also a 0 base. Search the web for a whole bunch of tutorials on hanging python udf to hive. It's all very simple and clear, too. So the study started, I picked a better implementation to learn, output a lot of Python written date processing function (after all, I am relatively lazy people). The function includes the monthly, month, quarter head, Quarter end, Monday, weekend, year, year end, n days, n weeks after, n months after the N-quarter processing function. It also makes a fun implementation of comparing upstream data with our data.

Logic is nothing more than a lot of digital processing, string processing. In the development of N weeks, N quarter time only to find that I go, can call the previous function to facilitate the calculation (for example, the N-week calculation can call the function of the Monday and calculate the N-day function), and then learn the Python function call.

More interesting is the quarterly calculation: quarter_begin= ' 0 ' +str (int (month)/3.1) *3+1)

These are simple implementations, but probably a little bit about python. If you want to understand the crawler to understand the site architecture, but also to engage in distributed, will crack verification code or something. If you want to learn about machine learning, you will also learn which Python algorithm packages. (I have not done, the latter need to choose another direction to learn.) But it will probably be machine learning ~)

Nonsense so much. It is also because I have always wanted to learn python, but have not found the right point of focus. But after writing this round of code, there is a general understanding of Python, although still very simple, but basically can meet the daily use of the date requirements. The heart is still flattered. Of course, these things are nothing to the great God. I hope you are the same as me in the transition learning stage of children's shoes. can also find their own way of learning.

After a while I will tidy up my code. and share it. Ask the great gods to help them learn. and ask for a future learning route.

Learn Python plans and impressions from scratch

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.