data-munging Questions

11

I'm doing some data munging which would be quite a bit simpler if I could stick a bunch of dictionaries in an in-memory database, then run simply queries against it. For example, something ...
Katowice asked 1/3, 2011 at 22:25

8

Solved

I use the following method a lot to append a single row to a dataframe. One thing I really like about it is that it allows you to append a simple dict object. For example: # Creating an empty dataf...
Rachael asked 24/1, 2022 at 16:46

4

Solved

The openxlsx::write.xlsx function is overwriting spreadsheet instead of adding another tab. I tried do follow some orientations of Stackoverflow, but without sucess. dt.escrita <- format(Sys.t...
Joeyjoffre asked 30/7, 2019 at 18:58

5

Solved

I have dataframe: subject A_target_word_gd A_target_word_fd B_target_word_gd B_target_word_fd subject_type 1 1 2 3 4 mild 2 11 12 13 14 moderate And I want to melt it to a dataframe that wi...
Reword asked 1/1, 2020 at 7:44

10

I need to stripe the white spaces from a CSV file that I read import csv aList=[] with open(self.filename, 'r') as f: reader = csv.reader(f, delimiter=',', quoting=csv.QUOTE_NONE) for row in r...
Killen asked 14/2, 2013 at 23:24

3

Solved

I'm surely missing something simple here. Trying to merge two dataframes in pandas that have mostly the same column names, but the right dataframe has some columns that the left doesn't have, and v...
Bundy asked 22/1, 2015 at 19:37

6

Solved

I have a data frame that I want to sort by one column than the next, (using tidyverse if possible). I checked the below address but the solutions did not seem to work. Order a "mixed" ...
Graziano asked 5/4, 2018 at 20:9

6

Solved

I need to convert dates into Excel serial numbers for a data munging script I am writing. By playing with dates in my OpenOffice Calc workbook, I was able to deduce that '1-Jan 1899 00:00:00' maps ...
Cookbook asked 5/3, 2012 at 22:8

5

Solved

I have a dataframe: df = col1 col2 col3 1 2 3 1 4 6 3 7 2 I want to edit df, such that when the value of col1 is smaller than 2 , take the value from col3. So I will get: new_df = col1 col2...
Terrell asked 17/2, 2020 at 14:15

2

Solved

How to remove the variables in python to clear ram memory in python? R : a = 2 rm(a) Python: a = 2 How to clear the single variables or a group of variables?
Mcgehee asked 21/1, 2017 at 8:10

2

I am new to Python and have worked my way through a few books on it. Everything is great, except visualizations. I really dislike matplotlib and Bokeh requires too heavy of a stack. The workflow I...
Phalange asked 14/5, 2014 at 15:39

2

Solved

I need some help with a concise and first of all efficient formulation in pandas of the following operation: Given a data frame of the format id a b c d 1 0 -1 1 1 42 0 1 0 0 128 1 -1 0 1 Const...
Strephonn asked 27/11, 2016 at 12:45

1

Solved

I encountered this behaviour when doing basic data munging, like in this example: In [55]: import pandas as pd In [56]: import numpy as np In [57]: rng = pd.date_range('1/1/2000', periods=10, freq...
Hickerson asked 19/10, 2012 at 12:34

2

Solved

Nine years ago when I started to parsing HTML and free text with Perl I read the classic Data Munging with Perl. Does someone know if David is planning to update the book or if there are similar bo...
Hebdomad asked 27/9, 2010 at 0:37
1

© 2022 - 2024 — McMap. All rights reserved.