Skip to content

Extract names of a sentence with regex

I’m very new with the syntax of regex, I already read some about the libary. I’m trying extract names from a simple sentence, but I found myself in trouble, below I show a exemple of what I’ve done. Anyone can explain me what is wrong and how to proceed? Answer I think your regex has two pro…

Can’t write in csv file

When I try to write the information in the csv file, error is thrown: How to keep the file open through the whole script execution ? Or I have to open it every time I am adding content ? EDIT In fact, the file is not even created. Answer The file closes at the end of the with block –

How to rearrange a CSV?

How to rearrange a CSV? I’m trying to rearrange this data set into years so that: becomes: https://raw.githubusercontent.com/TheEconomist/big-mac-data/master/source-data/big-mac-source-data.csv How can I do that? Answer Try (I used the data from your link and assumed which columns you need):

finplot as a widget in layout

I am trying to add finplot, https://pypi.org/project/finplot/, as a widget to one of the layouts in my UI. I created a widget for finplot and added it to the widgets in the layout but I get the following error: Here is the code that I used. Answer The create_plot_widget() function creates a PlotItem that cann…