Questions tagged as 'python'

3
answers

Average, Minimum, and Maximum in a dictionary in python

I have a dictionary of this genre: {walt: 0.942342, disney: 0.324234, robert: 0.562354, help: 0.546912, ...} And I do this to find the mean and the maximum: media = statistics.mean(dicContadores.values()) counter = collections.Counter(dic...
asked by 18.12.2018 / 00:59
1
answer

What is the difference between the wraps and update_wrapper functions of the funtools module

In module functools of bibliotaca padrão of Python there are two functions update_wrapper and wraps in the documentation of function wraps we have:    This is a convenience function for invoking up...
asked by 28.10.2018 / 02:25
1
answer

Tweets Crawler

I'm using the tweeter API provided by python to find certain tweets. The problem is that I want to see the tweets received by the person and not the tweets sent by the person , but I'm not having success, I only view the tweets of the page i...
asked by 22.10.2018 / 19:35
1
answer

Free API for Climatology [duplicate]

   As I explained to Guilherme in the comments, I make it very clear in my question that I want a climatological HISTORY. The question indicated as a duplicate does NOT show how to recover climatological HISTORY. Please try to read the questio...
asked by 03.07.2017 / 17:13
1
answer

Python Error SQLACHEMY

It is giving an error when I try to connect to the SQL SERVER database with SQLALCHEMY from sqlalchemy import create_engine, engine import pandas as pd engine = create_engine('mssql+pyodbc://User:password@server:1433/Bases_testes?drive=SQL+Ser...
asked by 28.10.2018 / 16:22
1
answer

Replace items in a list in a column of a dataframe

I'm trying to replace names that are in a list in a column of a large dataframe. I'm trying this way, but it's not working ... List of names (the list is too large): Jack Liam John Ethan George ... Small dataframe example: A...
asked by 29.10.2018 / 12:05
1
answer

Removing elements from a list

I'm having problems with my code. print('inserindo e removendo itens da lista\n') bom_dia = [] bom_dia.insert(0, 'python') bom_dia.insert(1, 'a') bom_dia.insert(2, 'b') print(bom_dia) print() del bom_dia[0] print(bom_dia) del bom_dia[1]...
asked by 30.10.2018 / 21:27
2
answers

Allow a list as argument

I have a REST API in Python that gets 2 arguments, a Url list and a word. I am a beginner in Python and would like to know if it is possible to split the URl string to accept more than one URL when requesting the body from the URL. For example,...
asked by 01.10.2018 / 15:21
1
answer

select one of the words in the list [closed]

Type a word into a list and then search for the word you typed lista = [] i = 0 palavra = '' while (palavra.lower() != 'sair'): i += 1 palavra = str(input('digite alguma palavra: ')) lista.append(palavra) ultima_palavra = len(lista...
asked by 01.10.2018 / 15:24
1
answer

Django map dynamically generated tables by another application

I will develop an application with Django where you will need to query data in a database that is powered by an ERP (desktop). This ERP generates some movement tables by adding at the end of the table name the month and the year, as a kind of...
asked by 02.10.2018 / 03:05