Skip to content

Tag: python

loop over rows of csv and put inside code

I am trying to read 5 columns from a 6 column csv data and use each row in a formula and itarete for all the rows. the file is csv file is something like this with hunderds of rows when I put values by hand it works all in well. However, when I put the df columns to do it

POST on MYSQL database done in terminal but nothing in my base

I would like to know why all seems to be okay but nothing is insert in my mysql database ? I get some data from an api and I would like to insert data in table. Using flask, python, pymysql Thanks in advance traceback Answer Assuming that the INSERT statement looked good at that debugging print function, then…

How to convert a bytearray in a tuple in a list to a string?

I am trying to fetch data from my mysql database using python: This reads a column in my database called binaryValue, where every row is either a “0” or a “1” When I print out the variable “myresult”, it gives me a list where each item is a tuple: I need to get a string wit…

ModuleNotFoundError: No module named ‘django.core’

I want to create django project so I’ve configured virtualenv ,and I installed django pipenv install django==4.0.1 when I create app using this command python3 manage.py startapp Accounts I got this error. can any one help to solve this problem ? Answer Instead of python3 manage.py startapp Accounts try…