Questions tagged as 'python'

1
answer

Proplema with layout: Widget does not resize with the window

I have a Dialog with a unique Wigdet that occupies the entire window. In this case it is a QTextEdit and is created with Qt Designer . This is the file in Python : from PyQt4 import QtCore, QtGui try:...
asked by 20.06.2018 / 12:33
0
answers

Rescue value from Widget Text in tkinter

I was recently learning how to put a comment box (using the Text widget) in a window made with tkinter and I was wondering if you could rescue the value or content that is entered by the Text widget, probe with the parameter " textvariable="but...
asked by 18.06.2018 / 00:24
1
answer

Read csv data double quote in python

I'm trying to read data from a csv file, especially numbers but I'm getting an unexpected result. example: csv: "17.913,92";"17.913,92"; import csv with open('eggs.csv', 'rb') as csvfile: reader = csv.reader(csvfile, delimite...
asked by 15.06.2018 / 18:32
0
answers

Change color palette in python

I have the following problem, the color palettes that matplotlib brings are predetermined, and I am making the following graphic: import pylab as plt import pandas as pd import numpy as np fig = plt.figure() x1 = np.arange(1,13,1) y1...
asked by 15.06.2018 / 01:01
0
answers

I need to pass parameters by HttpResponse or in which case I look for an alternative from a pdf generator

Good afternoon dear stackoverflow friends. I have a code that runs very well is a pdf generator from django. By means of which prints a html document as a common pdf and my current desire is to be able to pass parameters, that is, any diction...
asked by 13.06.2018 / 19:43
0
answers

Python IDLE message

Once the Python 3.6 is loaded, on a laptop processor I3 2.53 GHz, Windows 7 Ultimate SP1, 6 Gb RAM and 78 GB free. When trying to open the Python IDLE it shows the message "IDLE can not bind to a TCP / IP port"     
asked by 18.06.2018 / 16:29
0
answers

matplotlib.pyplot GRAPH ERROR

import pandas as pd import matplotlib.pyplot as plt GFG = pd.read_csv("C:/Users/Usuario/Desktop/algotrade/GFG11.BA.csv",decimal="," ,sep=";", parse_dates=["Date"], dayfirst=True, index_col='Date') # Defin...
asked by 14.06.2018 / 15:57
0
answers

How to solve TypeError: string indices must be integers?

I have the result of a union with dataframe merge. actor_crew = pd.merge(actor, crew, on='directors', how='inner') basic_actor_crew = pd.merge(Title_Data, actor_crew, on='tconst', how='inner') basic_actor_crew_ratings = pd.merge(basic_actor_cr...
asked by 14.06.2018 / 17:35
1
answer

Error in CSV file, Python

I want to read a file on my PC but I get an error, maybe you can help me import numpy as np import csv import logging csvFile = 'C:/Users/Usuario/Desktop/house/GFG.csv' def __init__(self, _data=csvFile, _shortTerm=10, _longTerm=15): s...
asked by 12.06.2018 / 20:52
0
answers

Cycle for averages with Pandas, frequency every 5 minutes

Hi, I have this df. I am trying to obtain average values assigned to each hour of measured data with a frequency of 5 minutes. This is how I charge the df from MySQL: import mysql.connector from mysql.connector import errorcode import pa...
asked by 12.06.2018 / 22:45