ArcGIS Pro 1.4 Pandas package Import bug fix whole process

Source: Internet
Author: User
Tags locale
Pandas--Panda bag is a python inside a super artifact, especially for those who are familiar with R language (such as shrimp God I This), the pandas inside of the dataframe that is like a therefore know prajna like the tears AH.

And pandas in the field of big data processing, known as the top of all the packages, because of its existence, gigabytes of data can be directly used to complete the single machine, the specific can see the following article:
"Processing billions of data with Python pandas"
http://python.jobbole.com/84118/

This package is not only strong, but also quite complicated, although the online various spread what "10 minutes to fix pandas" similar article, but the following is the official document of pandas, look:


1937 pages of official documents ... It's okay to print it out and hit the dead.

No wonder there are all kinds of simplified tutorials, otherwise chewing on official documents can kill people.

Because of this artifact package so bad, so the shrimp God used in any Python environment to install it, used up. This is the time to get the company to promote the ArcGIS new desktop client software ArcGIS Pro, so handy also ready to use in pro (as for what Pro is, we are interested to find information on the Internet, in short, this software has the following advantages:
1, 64-bit client (specifically to extinguish 32 bits of ArcMap)
2, two or three-dimensional integration.
3, strong local, network integration of resource utilization.
4, handsome ... Well, this one is enough.

Finally, the Python for Pro is version 3.5 ... It means that the Python encoding is no longer a problem.
Put a picture out:


But when I used pandas in pro, there was a sudden problem:


I'll go...... This moment, the expression of the shrimp God is like this:


embedded NULL byte...... What a ghost is embedded in an empty byte ...

Back to check the error of the Python source file calencar.py, which is a set return time file, and then read the wrong statement: Funcs (Self.format) ...

An instant dawned on me.



This is due to the issue of time formatting in the Chinese version of the operating system, ArcGIS Pro reads the system's time settings, burns geese, Python uses the default settings, so it's a conflict, so if you run the statement first:

#把Python的本地格式设为英文模式
Import locale
Locale.setlocale (locale. Lc_all, ' en ')
then import pandas:

There is a problem with the wood.

For convenience, you can add this sentence to the error py file:

in D:\Program files\arcgis\pro\bin\python\envs\arcgispro-py3\lib\ calendar.py
The previous section, where you installed ArcGIS Pro, find it yourself, followed by the file to be modified

Add the following code to your head:
_locale.setlocale (_locale. Lc_all, ' en ')

is as follows:



Join to finish saving, restart ArcGIS Pro, when importing pandas, the wood problem:
Test it below:


Finish the call.

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.