Python 3 data analyst
I have a problem with my script I am trying to plot a triangle marker v or ^ at the candles following my divergence on rsi or ao how to do it?My code countain this logic:def detect_divergences(df): #...
View ArticleHow can I call a method on a handler created by logging.config.dictConfig in...
I'm trying to set up a particular logging scheme for an application I'm building. For it, I want to be able to rotate logs arbitrarily on a custom condition. As such, the built-in options of rotating...
View ArticleКакочиститьвесь tkinter когда label находитьсявфункции def [closed]
Вообщем,ясоздоюсвоюопереционнуюсистемув tkinter но, янезнаюкакочиститьвесьтекстпотомучто, лэйбэлынаходятьсявфункции def,аотчисщятьпридходитьсявдругойфункции, таккактекстявывожувсекундувотдельнуюфункцию
View ArticleFlask Post method unexpected keyword argument
I want to perform two actions on one route:I want to show only information from table jobs for a specificID that was provided on the previous page.After clicking the Apply button I want to insert a new...
View ArticlePython CSV Processing: Existing Users Not Retained in Output File When Adding...
When adding new users to a CSV file using a Python script, the previously added users are not retained in the output file. The script reads existing users from an output CSV file, processes new users...
View ArticleHow to get data from ECB using SDMX?
I'm attempting to retrieve data from ECB using the sdmx library in Python.The code I currently have successfully fetches the values of the data:data = sdmx.Request('ECB').data( resource_id='EXR',...
View ArticleAn exception has occurred, use %tb to see the full traceback. SystemExit: 2
can anyone tell me how to make this code works in jupyter or any notebookCodeimport argparseap = argparse.ArgumentParser()ap.add_argument("-i", "--image", required=True, help="path to input...
View ArticlePython calculate number of words that match between two column
I want to calculate how many times a list of words appears in a column. Here is my dataframe:original people resultJohn is a good friend John, Mary 1Mary and Peter are going to marry Peter, Mary 2Bond...
View Articlewhy my kafka consumer reads sometimes yes and sometimes no
I'm trying to publish and read messages to a kafka topic in an kafka server deployed by a colleague.The problem:The consumer reads sometimes yes, sometimes no.I ran the consumer (and kept it on) and it...
View ArticlePython Polars: How to skip empty line in the CSV file using pl.scan()
Python Polars: How to skip empty line in the CSV file using pl.scan()?df=pl.scan_csv('c:/test.tab', separator='\t', skip_rows=2)print(df)c:/test.tab(delimiter is tab space)row1 : V5 test filerow2 :...
View ArticleUsing np.maximum.reduceat to reduce an 2D array
I had a 2D array, which a pair of float data coupled with index (shaped (3, k) float array).I wanted to get the maximum value in data[0] for each indexes at data[2], while also getting the same index...
View ArticleGroup rows with preceeded by 0 in Pandas
I have a requirment to group rows preceeding by 0 in column A and sum up the values in column B. For rows that are not prceeded by 0, print the same in output. How can i acheive this using pandas...
View ArticleHow to handle missing values (NaN) in categorical data when using...
I have recently started learning python to develop a predictive model for a research project using machine learning methods. I have a large dataset comprised of both numerical and categorical data. The...
View ArticleSyntax highlights, intellisense and autocomplete not working in jupyter...
for some background, I usually use vscode for creating input for my calculation, especially using the jupyter notebook extension to my WSL Ubuntu. so I've been setting up my vscode using standard...
View ArticleHow to get process status using pid?
If I known a process's pid, how can I tell if the process is a zombie using Python ?
View ArticleUsing Anvil FileLoader to import users csv file into Colab notebook as dataframe
I am trying to turn a Colab notebook into a web app. The notebook contains code that analyses a dataset. I have successfully managed to connect the notebook using:!pip install anvil-uplinkimport...
View ArticleHow does Gurobi handle the Piecewise Linear constraints inside its core program?
I am using gurobi to solve a Mixed Integer Linear Programming problem. Well, to be precise, the model is linear except a large number of piecewise linear constraints, which I know can be linearized...
View Article403 Forbidden 453 - You currently have access to a subset of Twitter API V2...
So basically I have a python code which checks for twitter likes, and reposts, and comments. I bought Basic Plan (100$/MO) and it still gives me this error even tho I have access to those endpoints....
View ArticlePandas dataframe can't find CSV file that I have
I am getting a FileNotFoundError for this section of code:df = pd.read_csv("EURUSD_Candlestick_1_D_BID_05.05.2003-28.10.2023.csv")However, I have this file in my Downloads and it is spelled correctly....
View ArticleHorizontal collision is not working as intended [duplicate]
EDIT:After countless hours, I'm still unable to fix the horizontal collision issue. I've used this link I was suggested to implement into my code:pygame platformer collision causes weird spacing issueI...
View Article