Posts by Marina • 351 points
5 posts
-
1
votes1
answer3941
viewsA: Python - Transforming line ranges into columns
I made a code that can be changed to various amounts of rows to be transposed into columns. First, I created a DataFrame with 40 elements (1, 2, ..., 40) in a column and stored its dimensions:…
python-3.xanswered Marina 351 -
7
votes4
answers320
viewsA: Flatten lists. Is a more concise solution possible?
One idea that shortens your code without calling in additional packages is: def list_unifier(lista_de_listas): lista_unificada = [] for lista in lista_de_listas: for elemento in lista:…
-
1
votes1
answer15660
viewsA: Python, ascending order of numbers
Hello! I suggest using the Sorted function: n1 = int(input('Digite um número ')) #O usuário digitou 9 n2 = int(input('Digite outro ')) #O usuário digitou 2 Lsta=[n1,n2] print(sorted(Lsta)) Upshot:…
-
5
votes4
answers7785
viewsA: Calculate circle area
I believe your code is not finished running because you have one more command asking you to enter a number area = scan.nextFloat(); although there is no System.out.print(Escreva o valor da área).…
-
5
votes1
answer357
viewsA: How do I describe a straight line equation of a glmm in an xy graph on R?
There are several ways to include the equation in the figure, depending on how you are filling the graph. Here are some examples, if you want a more specific answer to your problem, please enter the…