Skip to content

Tag: python

How to unlist given list in python?

I have to copy particular columns from a given file to another file. but while copying that columns to another file i don’t need them in list format. How can i do that? eg suppose file is abc.txt.gz From this data i needed to copy 3rd and 4th column and move to another file. Expected output: data.txt In…

matplotlib: reduce empty space on axis

The following code (obtained from here): Gives me this: What I’m trying to do is reduce the empty space on the y-axis, indicated here by the red bars: How can I do this? Changing the height of the figure doesn’t seem to help. Answer One quick solution is to manually set the margins using

How to draw lines between widgets in Tkinter?

I have written a script that takes in a file of the format Where each line in the list represents a ‘parent’ node and its list of ‘child’ nodes. So far I have written a script such that these nodes are printed out like a tree, and now I want to try to draw lines/arrows between these no…

How to recalculate data from table in flask/python?

I want to show df in my app, im using flask to do it. But how can i make the table editable and calculated sum value by using button? I couldn’t found good and easy way to edit that html table, and somehow send it to backend to recalculate. Most tips i found abuot editables tables involve data from sql