Posts by Arduin • 463 points
32 posts
-
0
votes1
answer370
viewsA: Using Values from a Dictionary Column to Create a New Column in a Dataframe
I managed to extract the names by creating a function. What happens is that the column has a JSON format, that is, each row is an object that can be converted to a list. For more information access:…
-
-1
votes1
answer370
viewsQ: Using Values from a Dictionary Column to Create a New Column in a Dataframe
I am trying to extract country names from a string type column that I have to create a new column in my Dataframe with just country names. The format is below: ["[{'iso_3166_1': 'US', 'name':…
-
0
votes1
answer107
viewsQ: Processing Complexity in a Pandas Dataframe
I need to deal with a base junction problem in the Python language. I have three layers of folders that I need to enter, find the file and merge into a dataframe. The layers being: year, month and…
-
2
votes1
answer196
viewsQ: Coloring specific points in Ggplot - R
I’m doing a graphical analysis of the package data gapminder. Soon, I made the following code: library('gapminder') dados6 <- gapminder ggplot(gapminder, aes(x = continent, y = lifeExp)) +…
-
0
votes2
answers216
viewsQ: Filter objects in DJANGO - published_date__lte
I’m following a tutorial for modeling a BLOG through the DJANGO . In one of the processes, I create an object with the site posts and order them through the publication date: def post_list(request):…
-
0
votes1
answer248
viewsA: Using Vundle on VIM
Problem solved! Fairly simple solution. I’m performing . vimrc’s global settings in the directory ~/.vim. However, settings should be changed in the central directory $HOME. So I did the following:…
-
1
votes1
answer248
viewsQ: Using Vundle on VIM
I recently installed VIM 8.0 on my Ubuntu 18.10. Then, I installed via this tutorial https://github.com/VundleVim/Vundle.vim a plugin manager for vim. There is therefore the directory ~/.vim which…
-
0
votes3
answers280
viewsQ: How Django URL works
I’m developing a Jango website. Where I own these two structures main from django.contrib import admin from django.urls import path, include from post import views urlpatterns = [ path('admin/',…
-
-1
votes1
answer47
viewsQ: Build error when recording information in a struct and substruct
I have a problem with my C code. My goal is to register categories in my first struct, which occurs without problems. Then, I want to register some subcategories for each category, which causes the…
-
2
votes1
answer119
views -
1
votes1
answer411
viewsQ: importing data extension ". date"
My Python code is loading a dataset from the internet, but the same is not recognizing the columnar number of the data. Python code: import pandas as pd ##Importando dados data =…
-
7
votes1
answer213
views -
0
votes2
answers1600
viewsQ: Vector size in C
I am new to the C language and am getting problems to determine the size of vectors of the struct type. Example. I have a category type structure with three types of variables 1 int and 2 char.…
-
0
votes3
answers4086
viewsQ: Warning: control Reaches end of non-void Function - c++
I’m doing a function to return the maximum and I’m having problems... #include <iostream> #include <cstdio> using namespace std; int max_of_four(int a, int b, int c, int d){ if(a >…
-
1
votes1
answer113
viewsQ: Histogram of Dates in GGPLOT
I am unable to perform the ggplot of the following table: Data Frequência 1 2016-06-11 3126 2 2016-03-05 218 3 2016-01-23 431 4 2016-06-04 145 5 2016-11-30 331 6 2016-15-01 275 Through the following…
-
4
votes1
answer92
viewsQ: Functions R - Strange Character
I created a function in the R and detected a strange character appearing on the return of the function. Can you explain to me? Here is the function: funcao_categorica <- function(xx){ rr <-…
-
3
votes3
answers1220
viewsQ: Use of the sub function in R - string with special characters
I am operating a database with the following values: data$Col_new <- data$Col_old Col_Velha Col_Nova Médico Médico Médica Intensivista Médico Técnica em Enfermagem Técnica em Enfermagem…
-
0
votes1
answer8561
viewsQ: Removing Row from Nan values of a Dataframe
I joined two tables via command pd.concat and I came across the problem of there being several Nan valoes. It turns out that there are values that are missing in one of the dataframes. To facilitate…
-
0
votes2
answers12885
viewsA: How to compile Python code in Sublime Text 3 running on the Linux operating system?
You need to indicate the location of your Python for Sublime Text 3, since Sublime Text is an editor and lacks the strength to compile or interpret programs. Go to the Sublime Text menu and take the…
-
1
votes1
answer11835
viewsQ: Sort Python Data Frame (Pandas) in two levels
I have this Dataframe and I want to organize it first by name and then by year, that is, Sort it in doís levels. How can I do that? Country Name Country Code Indicator Name Indicator Code Ano…
-
1
votes2
answers660
viewsQ: OS library Python - Locating Directories
I’m learning how to find directories in Python and came across the following code: import os dir_path = os.path.dirname(os.path.realpath(__file__)) print(dir_path) cwd = os.getcwd() print(cwd) Why…
-
0
votes1
answer61
viewsQ: Use of the set and for function in the same structure
I am studying data science through the Python language and came across the following code: world_trends_set = set([trend['name'] for trend in world_trends[0]['trends']]) us_trends_set =…
-
0
votes1
answer51
viewsQ: Segmetation fault error - Problem in main code for inserting nodes in binary tree
I am making a program that reads records and saves these records in a chained list and in a binary tree. However, I am not able to save the nodes in the binary tree by showing a segment fault error.…
-
1
votes1
answer3423
viewsQ: Binary Tree Implementation - C Language
I’m trying to insert a tree node. I am using this code, but there are a number of small errors that I cannot understand why of the errors. The last of them is related to valor1, which is not stated.…
-
-1
votes1
answer106
viewsQ: Function problem for printing names - Chained list (C language)
I’m having trouble to print out the names I am registering in this program. I’m inserting elements in a record: login, name and values. Each new element is inserted in a chain list. For example, if…
-
1
votes1
answer83
viewsQ: Chained List Value Printing - Pointer Problem (C Language)
I’m having trouble printing out the values on my list. I believe the function is right, however the following error is happening when I try to compile: "error: expect declaration specifiers or ..…
-
1
votes1
answer234
viewsQ: Problem implementing a chained list - list insertion
I’m trying to accomplish this implementation in C. I’m having two problems. First: Inside the main, I log the data I want and when I go to insert in the list I get a problem. Second: My data reading…
-
0
votes1
answer508
viewsQ: How does a chained list work in C?
I’m doing a job for college and I still don’t fully understand the logic behind a chained list in C. I need to log in, name and value in a record, of which I created a struct (set of variables); I…
-
-1
votes1
answer281
viewsQ: Chained List in C - How to implement insertion function
I am trying to implement data into a chained list. How can I do a function to enter login data, name and value into my list? typedef struct registro_st{ // sequência de objetos do mesmo tipo char…
-
2
votes1
answer145
viewsQ: Strange result on to.Monthly (quantmod package) cut series
Problem with my to.monthly. He cuts my data series, I don’t know why. ####install.packages("quantmod") library(quantmod) ####install.packages("PerformanceAnalytics") library(PerformanceAnalytics)…
-
0
votes1
answer2257
viewsQ: PROBLEM WITH FGETS IN C
#include <stdio.h> #include <stdlib.h> /*definir operador lógico para chuva (1 para TRUE e 0 para FALSE) */ #define TRUE (1==1) #define FALSE (!TRUE) struct eventos_atm_st { float temp;…
-
1
votes2
answers87
viewsQ: Why is this code not generating the average correctly?
#include <stdio.h> #include <stdlib.h> float media(int n, float* v){ int i; float s; s = 0; for(i=0;i<n;i++){ s += v[i]; return s/n;} } float variancia(int n, float* v, float m){ int…