python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Pandas - concating multi-indexed dataframes keeps duplicate indizes
Hello I'm trying to read in multiple dfs of the same structre and concating them into a single one however the combined df somehow keeps duplicates in the indizes....
df1 = processUSAdata(2223)
df2 = ...
Florian
Votes: 0
Answers: 2
Pandas MultiIndex dataframe to nested json
I have the following pandas multi-index dataframe and I would like it to become a nested json object.
import pandas as pd
data = {'store_id' : ['1', '1','1','2','2'],
'item_name' : ['apples',...
RTorres
Votes: 0
Answers: 1
Pandas to nested YAML
I am trying to build and dump yaml content to file:
Here is what it should look like
group:
Base Configuration:
id: 1
group_name: Base Configuration
group_members:
- S3-WLP-Kafka-top...

Prakhar Jhudele
Votes: 0
Answers: 1
I am having difficulty finding the unique multi index tuple of my dataframe
I am having difficulty finding the unique multi index tuple of my dataframe.
np.random.seed(0)
df = pd.DataFrame(np.random.randint(0,100,size=(100, 5)), columns=list('ABCDF'))
df = df.set_index(['A','...
Matthew Hooper
Votes: 0
Answers: 2