Skip to content

Tag: python

Gaussian Addition – Python Challenge

I am currently working on some beginner python challenges, I just finished a gaussian addition challenge. I was able to get the output that the challenge was looking for, but it seems like I over complicated things. The challenge is as follows: Write a program that passes a list of numbers to a function. The …

manipulating csv file python

i want to rearange a csv file : from actual format to format desired i do generate this csv file by searching in a another csv file using: and i want the result diffrently as showen above. Thanks. got a partiel answer : and now the result is : i need to dispatch them on every line Answer I don’t

Pandas split list upon DataFrame creation

I have a JSON file coming in, which I am doing some operations/trimming on. The result looks like this: When applying df = pd.DataFrame(user, index=[0]) I get the following Dataframe: When applying df = pd.DataFrame(user) I get: I am aware, as to why that happens, however none is what I want. I’d like t…

Streamlit python variable declaration

I wrote some dummy code to replicate my problem. I need to do some simple computations in Streamlit, but I can’t seem to find out how they handle variables and how to store info Here is my example: I get the error: What am I doing wrong? Answer The question has nothing to do with Streamlit, the variable…