Skip to main content

All Questions

Tagged with
0 votes
0 answers
32 views

Changes made to Panel table not reflecting in dataframe Vertex AI environment

I'm facing an issue with Panel library while trying to modify values directly from a table within a Vertex AI environment. Here's the problem: I'm using the Panel library to create a table widget (pn....
Jagdish Kumar's user avatar
0 votes
0 answers
93 views

Why is the .apply function for the .style attribute in pandas.DataFrame not called/accessed?

I have a funtion in my project, using pandas and Panel, which has a strange behaviour. def _filter_cluster_df(self, selected_items): def _highlight(row, mask_i): print("...
Giovanni Genna's user avatar
0 votes
0 answers
399 views

template.serveable() not working as expected in Python panel

I have the four CSV files stored in local. Each corresponds to some store details which has ItemNumber, ItemName, ItemBrand, and ItemCost. I am using a Python panel to display the CSV files in a ...
Thushar Mohan's user avatar
0 votes
0 answers
106 views

Reshape data to match statsmodels and exog contains inf or nans

I'm attempting to set up a panel TVPVAR using statsmodels, running first a local model. Coming from Stata, I am confused on how to proper reshape my data to match what statsmodels expects. The data ...
John D.'s user avatar
1 vote
1 answer
100 views

Add column to Interactive pd.DataFrame

I'm having trouble to understand how to deal with pandas DataFrame once it is interactive. Also I can't find any helpful sources to find out what options an interactive DataFrame is providing. ...
Paul Borowy's user avatar
0 votes
1 answer
80 views

Identify change of state of individual in panel data using pandas

I have panel data (repeated observations per ID at different points in time). Data is unbalanced (there are gaps). I need to identify for a change in variable per person over time. Here is the code to ...
Suryadipta's user avatar
0 votes
0 answers
82 views

Compute mean before (and after) specific date

I have a pandas data frame that looks like this: id year dummy variable A 2010 0 25 A 2011 0 35 A 2012 1 21 A 2013 1 36 A 2014 1 45 B 2009 0 17 B 2010 1 27 C 2003 0 13 C 2004 0 45 C 2005 1 ...
finconomist's user avatar
0 votes
1 answer
283 views

HoloViews: create boxplots interactive

I'd like to create a Dashboard where the user can choose which data is shown in a Boxplot via chosing by button. All I could find where instructions for linear-interactive plots, unfortunately i am ...
Paul Borowy's user avatar
0 votes
2 answers
413 views

Add a new column having a dummy variable for complete group based on a condition

I have the following dataframe: df = pd.DataFrame({"id": ['A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'C','C','C','C'], "date": [2015, 2016, 2017, 2018, ...
Researcher's user avatar
0 votes
1 answer
204 views

Group sorting longitudinal (panel) data depending on data and asset

I've been trying to sort my panel data (pandas DF) which is divided into several assets and different starting dates per each. The idea is to discover which starts the earliest, so that it can be ...
Piotr's user avatar
  • 87
0 votes
1 answer
141 views

Create DataFrame from filepath interactive after choosing from Drop Down menu with Panel Select Widget

I would like to have a Select Widget with Panel where I can select ids from a dictionary. The IDs are the key and the values are file paths to geojson files storing tabular data. After i interactively ...
till Kadabra's user avatar
0 votes
0 answers
105 views

Adding empty rows to a multi index panel in python

Add an empty row to MultiIndex DataFrame I want to refer to this link. How could I add the column idx_2 and its content r_1, r_2, r_3 to the new added row 'bar'? I want to do a linear extrapolation ...
Antonio Smith Bravo's user avatar
0 votes
1 answer
973 views

pandas DataFrame: replace nan values with median of columns for each period

I've got a pandas DataFrame (panel data) filled mostly with real numbers, but there is a few nan values in it as well. How can I replace the NaNs with the median of the columns for each year (cross-...
Kristina Zhupunova's user avatar
1 vote
2 answers
633 views

Balancing a panel data for regression

I have a dataframe: df = pd.DataFrame({"id": [1, 1, 1, 2, 2, 3], "city": ['abc', 'abc', 'abc', 'def10', 'def10', 'ghk'] ,"year": [2008, 2009, 2010, 2008, 2010,2009], &...
Jui Sen's user avatar
  • 377
1 vote
0 answers
4k views

AttributeError: module 'pandas' has no attribute 'Panel'

I'm working on a Time Series project and want to use the statsmodels package. However I'm having trouble to import it. When I run this : import statsmodels.api as sm I get this error : AttributeError: ...
Kamyajin's user avatar

15 30 50 per page
1
2 3 4 5
8