来自多个列表的多个字符串
我有以下内容:
import pandas as pd
Roads =['Motorways','Streets','Avenues']
Countries = ['England','Scotland','Wales']
Visuals = ['Graph','Table']
TabNames = [pd.Series(Roads)+ pd.Series(Countries) + pd.Series(Visuals).tolist()]
print(TabNames)
我将如何打印输出,以便像“高速公路英格兰图”,苏格兰高速公路图,“高速公路威尔士图”,“街道英格兰图”等等。
然后,如何复制输出或将其吐出到.txt文件?
I have the following:
import pandas as pd
Roads =['Motorways','Streets','Avenues']
Countries = ['England','Scotland','Wales']
Visuals = ['Graph','Table']
TabNames = [pd.Series(Roads)+ pd.Series(Countries) + pd.Series(Visuals).tolist()]
print(TabNames)
How would I print the output so that it would be like 'Motorways England Graph', Motorways Scotland Graph', 'Motorways Wales Graph', 'Streets England Graph' so on and so forth.
How do I then copy the output or have it spit it out to a .txt file?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以尝试此操作而无需导入任何库:
输出:
You could try this without the need to import any library:
Output:
尝试以下操作:
Try this: