Questions tagged as 'python-3.x'

1
answer

How to separate a list with a delimiter?

How can I do this exercise? "Write a program that given a text file, a delimiter, and a list of fields, print only these fields, separated by this delimiter. " At the moment I have this: f=open("archivo.txt","r") delimitador=str("-") list...
asked by 09.02.2018 / 19:53
1
answer

Get common elements from two lists without repetitions

I have to implement the following statement:    Design a function that receives two lists and returns common elements to   both, without repeating any (intersection of sets).   Example: if you receive the lists [1, 2, 1] and [2, 3, 2, 4], you...
asked by 08.01.2018 / 13:47
1
answer

Unable to call the "list" object when using Session.add_all [closed]

I am inconvenienced with this code generates me error:    id_ccf = input ("Type the name of the CCF"))])   TypeError: 'list' object is not callable I do not understand why, I do not have any object named 'list'. This is the relevant part...
asked by 14.12.2017 / 01:45
1
answer

Error "Single positional indexer is out of bounds" when reading csv

When I run the following code: from pandas import Series from matplotlib import pyplot from statsmodels.tsa.seasonal import seasonal_decompose series = Series.from_csv('GOOG.csv', header=0) result = seasonal_decompose(series, model='multiplica...
asked by 03.12.2017 / 18:56
1
answer

Store data generated in a cycle for a list

I have a problem, within a cycle for I have a variable that is changing value and I want to save each value generated within a list to be used in other operations. In my case, the variable that changes value is Asx , and I want to s...
asked by 16.11.2017 / 01:49
1
answer

Error: csv.Error: field larger than field limit (131072)

I have a program that opens csv files, operates with phrases and records data in another csv file. I am now getting an error that I had never obtained before. I have searched the Internet for solutions but I can not find much. The error is...
asked by 07.11.2017 / 16:14
1
answer

Error '' 'bool' object is not subscriptable ''

I do not want to sound demanding or anything so I just want to ask you a huge favor, I try to make a program that has 20 rooms (they are all those s1 , s2 etc with true ) tell me if they are busy or no, if ' 'numero de habi...
asked by 26.11.2017 / 19:19
1
answer

Validate a field in python

this is my code: from math import * import os import time import sys salir = False print("por favor no escribir cosas no relacionadas o el programa dara error") print("cargando...") time.sleep(3) os.system('cls') while not salir:...
asked by 05.01.2018 / 07:25
1
answer

Warning in conditional sentence

I have a variable save to store the directory that indicates where to save a graph or, otherwise and by default, it has the value False . Next, the following sentence: if save != False: plt.savefig(save + "/" + title + ".pn...
asked by 05.01.2018 / 11:29
1
answer

Count base frequency in record file

I am looking for ways to improve the following piece of code in such a way that instead of making a total count of the bases of all the records found, it does so by registration. On the other hand I would also like to make it sensitive to one ty...
asked by 29.10.2017 / 20:04