Click on " Python Crawler and Data Mining " above to pay attention
Reply to " Books " to get a total of 10 e-books on Python from entry to advanced
now
Day
chicken
Soup
The businessman paid more attention to profit than left, and went to Fuliang to buy tea the month before last.
Hello everyone, I am Pippi.
I. Introduction
A few days ago, I asked a Pycharm
basic question in the Python Silver Group [Such Creatures], and I will share it with you here.
The original string is as follows:
str1 = "校企联合,省料学,市科学,区科学,社会料学,料学院,料学家,科学实验室,国家料学,国防料学,能源料学,生命科学,计算机料学,国家料学,研究所长,研究所副所长,研究所合作"
2. Implementation process
In the previous article, we used the string segmentation method to perfectly solve this problem. Here is a new method using regular expressions for matching and replacement.
There are two details that need to be grasped here. The first is that you need to select the regular mode, and the second is that you need to pay attention to the comma in the regular expression mode must be in the Chinese mode, so that it can be matched with the original string. Otherwise, the data cannot be matched.
Note that there are basically no problems with these two points.
Solved the problem of fans smoothly. There are many ways, all roads lead to Rome, as long as it can solve the problem.
3. Summary
Hello everyone, I am Pippi. This article mainly takes stock of a Pandas
basic problem. Aiming at this problem, the article gives specific analysis and code implementation to help fans solve the problem smoothly.
Finally, I would like to thank fans [such creatures] for asking questions, thank [Teacher Yuliang], [Dongge], [kim], [巭嫑勥烎] for their ideas and code analysis, and thank [冫马讠成] and others for participating in the study comminicate.
[Supplementary questions] Warm reminder, when you ask questions in the group. You can pay attention to the following points: if it involves large file data, you can desensitize the data, send some demo data (meaning small files), and then paste some code (the kind that can be copied), and remember to send the screenshot of the error report (complete cut ). If there are not many codes, just send the code text directly. If the code exceeds 50 lines, just send a .py file.
If you have any problems during the learning process, please feel free to contact me to solve them (my WeChat: pdcfighting1). At the request of fans, I have created some high-quality Python paid learning exchange groups and paid order receiving groups. Welcome everyone to join me Python learning exchange group and order receiving group!
Friends, hurry up and practice it! If you encounter any problems during the learning process, please add me as a friend, and I will pull you into the Python learning exchange group to discuss learning together.
------------------- End -------------------
Recommendations for past wonderful articles:
Welcome everyone to like, leave a message, forward, repost, thank you for your company and support
If you want to join the Python learning group, please reply in the background [ join the group ]
Thousands of rivers and thousands of mountains are always in love, can you click [ Looking ]
/Today's Message Topic/
Just say a few words~~