使用python将选项卡分隔数据导入HTML [英] Imported tab delimited data into HTML using python

查看:73
本文介绍了使用python将选项卡分隔数据导入HTML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我正在使用Python创建HTML报告,并希望将一些以制表符分隔格式的表格数据导入HTML页面。


数据需要在HTML页面中显示为一个表格,但我不知道如何去做。


提前致谢,


Niten

解决方案





我正在使用Python创建HTML报告,并希望将一些以制表符分隔格式的表格数据导入HTML页面。


数据需要在HTML页面中显示为一个表格,但我不知道如何去做。


提前致谢,


Niten



看来这是HTML和Python的综合问题。如果我们知道放置它的位置(行号,某个关键字或字符序列之后等),使用Python将格式化数据插入现有文件是很简单的。因为我不知道HTML(并且我真的不想知道),所以我无法帮助。我们可能有一位知道这两者的专家,或者HTML论坛上有人可以提供帮助。






我正在使用Python创建一个HTML报告,并希望将一些以制表符分隔格式的表格数据导入HTML页面。


数据需要在HTML页面中显示为一个表格,但我不知道如何去做。


提前致谢,


Niten



HTML页面是否已经存在,或者您是否正在创建HTML页面显示数据?

我这样做的方法是解析制表符分隔的数据集,并将数据存储为列表列表。

那么你可以迭代使用嵌套的for循环写出HTML标记。



HTML页面是否已经存在,或者您是否正在创建要显示的HTML页面数据?

我这样做的方法是解析制表符分隔的数据集,并将数据存储为列表列表。

然后你可以迭代通过嵌套for循环写出HTML标记。



我正在创建一个HTML页面,需要显示以制表符分隔格式的数据。


我我刚刚开始学习Python,我将如何解析分隔数据集?


再次感谢,


Niten


Hi,

I''m creating a HTML report using Python and would like to import some tabular data which is in tab delimited format into the HTML page.

The data needs to be displayed as a table within the HTML page, but i''m not sure how to go about doing it.

Thanks in advance,

Niten

解决方案

Hi,

I''m creating a HTML report using Python and would like to import some tabular data which is in tab delimited format into the HTML page.

The data needs to be displayed as a table within the HTML page, but i''m not sure how to go about doing it.

Thanks in advance,

Niten

It seems this is a combined HTML and Python question. Using Python to insert formatted data into an existing file is straightforward if we know where to put it (line number, after a certain keyword or character sequence, etc.). Since I don''t know HTML (and don''t really want to know), I connot help with that. We may have an expert here that knows both, or someone on the HTML forum can help.


Hi,

I''m creating a HTML report using Python and would like to import some tabular data which is in tab delimited format into the HTML page.

The data needs to be displayed as a table within the HTML page, but i''m not sure how to go about doing it.

Thanks in advance,

Niten


Does the HTML page exist already, or are you creating an HTML page to display the data?
The way I would do this, is to parse through your tab delimited data set, and store the data as a list of lists.
Then you can iterate through with nested for loops writing out HTML tags.


Does the HTML page exist already, or are you creating an HTML page to display the data?
The way I would do this, is to parse through your tab delimited data set, and store the data as a list of lists.
Then you can iterate through with nested for loops writing out HTML tags.

I''m creating a HTML page which needs to display data which is in the tab delimited format.

I''ve only just started learning Python, how would I go about parsing through the delimited data set?

Thanks again,

Niten


这篇关于使用python将选项卡分隔数据导入HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆