Hello I can’t find a solution for the example here. I found https://stackoverflow.com/a/36666420/6089311 but there is no stream reading. I’d like to run two subprocesses independent of python program (running in the background). The first subprocess feeds the second process through the pipe and I want to do some processing with the stdout lines by stream way. The example bellow
Tag: python-3.x
How to print a nested list in a HTML file using python?
I am trying to write a HTML file using python, and I want to print in .html a nested list. I have written this, but I don´t have any idea about how to doit good. In .html I want to print the nested list in a table in this similar format: Answer I tried to edit the accepted answer but
ModuleNotFoundError with setup.py using a compiled pyc module
I can normally import a compiled .pyc module as well as .py, but when trying to package a simple project with setup.py, I’m getting the ModuleNotFoundError exception for the compiled .pyc module. Because this is only happening when using setup.py, otherwise is working fine, I don’t know if there’s something I should had to setup.py to make this work. The
How to read a day and time on the same line?
I was trying to reproduce the following entry in Python: 05 08:12:23. I did it as follows: Notice how there is a space after day and the split () I put to separate the numbers with ‘:’. How would I go about reading the day on the same input? Is there a better way to do this than what I’m
Develop a module to help generate lottery tickets in python
I have made the two modules (which are incomplete I guess) for the main function but couldn’t make the main function Create a script file named lottohelper_using_getopt.py for the module in your current workspace/directory. Define a function named lotto649 (in the script/module file) which can generate and return six different random integers in a list from range [1,49]. (1 point)
how to get dates from yahoo finance
I have a problem with getting the dates from yfinance into my matplotlib graph can somebody help/show me how to get the dates from yfinance into my matplotlib graph Answer Tested ✅ 🔰You could extract the date from ticker_history[observation] 🔰 It is a Pandas Series object, so here’s how I’d do it:
Where does dask store files while running on juputerlab
I’m running dask on jupyterlab. I’m trying to save some file in home directory where my python file is stored and it’s running properly but I’m not able to find out where my files are getting saved. So I made a folder named output in home directory to save file inside, but when I save file inside it I’m getting
Replacing values using dictionary
What are the reasons why are regex replacment doesn’t work? I have tried ensuring no excess spaces. When I do df.loc[df[‘column’]==”and another reason with her”] nothing has changed. Answer Please use df.replace(regex=dict)
Import Error: can’t import name gcd from fractions
I’m trying to import a function called gcd from a module called fractions with from fractions import gcd. For some reason, PyCharm throws an ImportError: I had this working before, what am I doing wrong? Answer Your traceback says Python 3.9 and the documentation says gcd is a function in math Changed in version 3.9: The math.gcd() function is now
sum the elements of 2 NumPy arrays
I am trying the sum the elements of these arrays…..but it is throwing this error in jupiter notebook Answer You first need to append the two arrays together, then you can take the total sum.