Questions tagged as 'python'

1
answer

How to insert a value into a database in sql with python language?

from query import PzasOP14 ns = event.source.parent.getComponent('NoDeSerie').text pok= event.source.parent.getComponent('PzaOk').text pnk= event.source.parent.getComponent('PzaOk').text tc = event.source.parent.getComponent('TiempoCiclo').text...
asked by 31.10.2018 / 18:33
6
answers

Read Chains Python

I need to obtain values that are contained in a string of type str separated by a "," and that when I find the comma, save that value in a new variable for example, I have the string: 10.90,500,56.99 and I want to save the values in a new...
asked by 31.10.2018 / 08:32
1
answer

Perform queryset between 3 models

I have 3 models: Student, Characterization and semester I need to obtain a queryset with the semesters that NO have been registered in the characterizations of each student. I mean, each student can have a number of characterizations and...
asked by 10.10.2018 / 00:43
0
answers

Improve the speed by creating dynamic columns in a Dataframe

I am creating a Dataframe with the following information: import numpy as np import pandas as pd from time import time start_time = time() columns = 60 Data = pd.DataFrame(np.random.randint(low=0, high=10, size=(700000, 3)), columns=['a', '...
asked by 08.10.2018 / 22:33
0
answers

update django version of a project

What is the correct way to update the python and django version of an old project? generate a more updated virtual environment and correct the errors that are generated by the version change? I'm really new to the subject, thank you in advance....
asked by 10.10.2018 / 14:35
1
answer

Problem with pandas.DataFrame.cumsum function

I have the following dataframe in python: month = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,1,2,3,4] active = [1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1] data1 = [1709.1,3869.7,4230.4,4656.9,48566.0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,...
asked by 27.09.2018 / 17:14
0
answers

Help with cycles for python

I'm doing a tour of a database in Firebase using for cycles for a school exercise: This is the cycle that I occupy to be able to go through the database: from firebse_login import * fecha = "2018-09" lista_mañana_r = [] l...
asked by 24.09.2018 / 18:15
0
answers

Unable to retrieve data with pydelicious when I initialize a dictionary

I want to use functions to create a database between users and items. I use the functions that you can see here that allow you to do it on the del.icio.us API. However, when I initialize the user dictionary there are problems: Python 2.7.12...
asked by 21.09.2018 / 15:01
1
answer

How do I store in a tuple or list the values of a JSON dictionary in Python?

I currently have the following JSON dictionary: tree = { 'MADRE': '323', 'reports': [{ 'MADRE': '4444', 'reports': [{'MADRE': '5'}, {'MADRE': '4'}] }, {'MADRE': '3', 'reports': [{'MAD...
asked by 24.09.2018 / 16:15
3
answers

Position of the largest prime number in a list

Good afternoon this is my code it took almost 2 hours looking at what I'm wrong and I could not find out please could you help me '' 'Read 10 integers, store them in a list and determine in which position of the list is the highest number rea...
asked by 23.09.2018 / 19:56