Posts by Maursb • 124 points
13 posts
- 
		0 votes1 answer283 viewsA: Map function with lambda in a list of Python dictionariesI was able to solve using the list function: list(map(lambda t: t["id"], infos['custom_fields'])), list(map(lambda v: v["value"], infos['custom_fields'])) return: ...,[360022972013, 360022962034,… 
- 
		0 votes1 answer283 viewsQ: Map function with lambda in a list of Python dictionariesGood evening, I’m taking the data via API and turning it into a . JSON to record in a list:. Inside this info is a list of dictionaries called custom_fields, so I used map with lambda function to… 
- 
		0 votes0 answers111 viewsQ: Error in python API call - JsondecodeerrorI’m making this call in a Mailchimp API, but it’s returning an error in json that I don’t know how to solve, can help me?? My code: import requests import psycopg2 key = 'KEY' url =… 
- 
		0 votes1 answer269 viewsQ: Select from and Insert into another database with PythonI’m trying to select a DB from Azure and after that insert the data into a postgresql DB. I tested the separate connections and both are working, but when running the full code nothing happens until… 
- 
		4 votes3 answers4376 views
- 
		0 votes1 answer578 viewsA: Insert or update Posgresql via PythonI used the On Conflict Update clause (documentation link) and removed the truncate before entering the data. My code stayed that way: conn = psycopg2.connect("dbname='DBNAME' user='USER' host='HOST'… 
- 
		1 votes1 answer578 viewsQ: Insert or update Posgresql via PythonToday I am using the following code to call via API and store my data in the Postgresql database: conn = psycopg2.connect("dbname='DBNAME' user='USER' host='HOST' password='PASSWORD'") insert =… 
- 
		3 votes1 answer1254 viewsA: Excel - cell with "hidden" charactersHello, try using the formula =TAKE OUT() Take Out Formula: Remove all non-printable characters from the text 
- 
		0 votes1 answer74 viewsQ: How to display hidden div after page reload?Hello, everybody. I am developing a page where there is a hidden button that appears after a certain time. My code: HTML: <script… 
- 
		0 votes1 answer630 viewsQ: Python - Json : KeyerrorI’m making the call in a Mailchimp API in which I list the fields to insert into my DB. In the JSON provided by the documentation, the following fields appear: { "automations": [ { "id":… 
- 
		0 votes1 answer14224 viewsQ: Typeerror: list indices must be integers or Slices, not strHello, everyone. When I run this code I get the following feedback: Typeerror: list indices must be integers or Slices, not str How can I fix this? import pagarme import psycopg2… 
- 
		0 votes1 answer487 viewsQ: No module named - PythonHello, I did the installation of mailchimp3 this way: pip install mailchimp3 And also from Makilchimp: pip install mailchimp They did not present any error. When I’m going to perform the tapeworm in… 
- 
		1 votes1 answer14386 viewsQ: Typeerror: string indices must be integers - PYTHONwhen I try to list json, it is returning the error: save.append((Infos['web_id'], Typeerror: string indices must be integers Can you help me understand how this happened? I have little experience in…