Tag Archives: data visualization

[Solved] python3.10 Error: cannot import name ‘Iterable‘ from ‘collections‘

Generally, errors will be reported when using the pyechards library for higher versions of Python:
cannot import name ‘iteratable’ from ‘collections’

Solution:
go to the directory where the pyecarts library is installed, enter the pyecarts file, open render, and continue to open engine Py file, where you can find the following code:

from collections import Iterable

Change to the following code:

from collections.abc import Iterable

Call through the following command, and no error will be reported again

from collections.abc import Iterable

cv2.error: OpenCV(4.5.1) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-buil

catalogue

The following operations are carried out under the windows environment.  

one   Change single slash to double slash

2. The modified path is in English

3. Delete CV2. Imshow ()


When I use CV2 to save pictures to a new price asking folder, I report an error CV2. Error: opencv (4.5.1) C: \ users \ appveyor \ appdata \ local \ temp \ 1 \ PIP req build

The solution is as follows:

The following operations are carried out under the windows environment.  

one   Change single slash to double slash

Some people on the Internet say that the path reading error is caused by the number in the path. Correction method: change the single slash in the path into double slash.

For example:

cv2.imwrite(save_dir + '\\' + img_name, img)

However, the same error is reported later, so read the following comments for 2 operations:  

2. The modified path is in English

I reported a similar error here because Chinese appears in the quoted picture path. If you change the picture path to an all English path, there will be no problem.   

for i in ori_imgs_single:
    img_name = i.split('\\')[-1]
    img = cv2.imread(i)
    cv2.imwrite(save_dir + '\\' + img_name, img)
print('save OK!')

OK:

3. Delete CV2. Imshow ()

Maybe there is something wrong with my environment. If you still report an error, try deleting CV2. Imshow (). If I delete it, it will be OK:  

 

  OK:

 

Keyerror: “year not in index”

During learning, when writing Python code, the following error was reported: “keyerror” [‘year ‘] not in index “.

Problem description

When learning data visualization, the pandas package is called, and the code runs with an error. The error prompt is as follows

KeyError: "['year'] not in index"

Key error: ‘[‘year’] is not in index ‘

problem analysis

Check the code and find that the front and the back are inconsistent, and there are some problems when you write your own code

Solution
delete “1” and solve the problem

OK, keep learning.

Module ‘Seaborn’ has no attribute ‘scatterplot’ solution

First, Seaborn contains the scatterplot module. However, running the corresponding sentence without syntax error will report an error, because the current Seaborn version is 0.8 or below.

Examples of errors are as follows:

Solution: upgrade Seaborn version! The corresponding statement is: PIP install Seaborn = = number of corresponding versions, for example: PIP install Seaborn = = 0.9.0

Rerun the statement to draw a normal diagram

During this period, CMD may require upgrading, and run for many times: Python – M PIP install — upgrade PIP may be invalid

Error, feedback similar permission problems, specific debugging methods can refer to the following:

https://blog.csdn.net/weixin_ 43870646/article/details/90020874

If: no module named pip.basecommand

It is suggested that you can uninstall the old version and re install the new version. The corresponding steps are as follows. Or you can refer to the author’s method https://blog.csdn.net/GuaPiQ/article/details/100593848

After reloading pip, you can upgrade Seaborn according to the first step above.

How to install CONDA can refer to this article: https://www.jianshu.com/p/edaa744ea47d

How does lightningchart, a high performance chart control, draw maps in 3D?

LightningChart is primarily a charting component (charts are graphical representations of data) rather than a virtual environment creation tool. However, LightningChart provides multiple ways to use geographic maps, not only in 2D, but also in 3D.
If you are primarily interested in 3D maps, Artion can provide three examples of possible ideas. First, you can import a map/image into a “chart” and create a surface whose geometry and color are based on map elements (such as shading). Example of this type in ExampleArgesurface:

Example large surface
As shown in ExampleGlobal Surface3D, such a surface can be wrapped in any shape

Example Globesurface3D
You can also use the information/data from the map (for example, boundary residents, population size, etc.) to create Chart 3D objects (which can be pointlineseries3D, meshModel, polygon3D, etc.). In ExamplePopulationPolygons3D demonstrates a kind of such a method.

Example population polygon 3D
LightningChart.net is fully GPU-accelerated and optimized for displaying massive amounts of data in real time — over 1 billion data points. LightningChart includes a wide range of 2D, Advanced 3D, Polar, Smith, 3D Pake/Doughnut, Geographic Maps and GIS charts as well as volume mapping capabilities for science, engineering, medicine, aviation, trade, energy and other fields.