开发者

Plotting a table/chart/grid in Python

开发者 https://www.devze.com 2023-02-14 13:03 出处:网络
Assume the user inputs his file.The format is something like: Name\\t182909876\\n Name 2\\t090开发者_运维知识库090090\\n

Assume the user inputs his file. The format is something like:

Name\t182909876\n
Name 2\t090开发者_运维知识库090090\n
etc...

I want to plot this data onto a chart, a grid, or a table.

data_list = []
with infile as f:
    data = [map(str, line.split('\t')) for line in f]


matplotlib is what you need to plot numbers. Seeing that your code above generates nested lists of strings, you might have to improvise ..

0

精彩评论

暂无评论...
验证码 换一张
取 消