data-science

How to get company earning announcements data api?

How to get company earning announcements data api? Question: I want to get real-time earning annoouncements data api. I tried yfinance but it doesn’t work currently. So is there any other replacement api? Most of API need to pay money, But I just want to try for my personal projects so it’s little pressured Does …

Total answers: 1

Finding all possible sums of three integers within a list

Finding all possible sums of three integers within a list Question: I need to use a list of perfect cubes to find all possible sums of three different numbers within that list. The sum must also be a perfect cube. My original solution was to nest 3 for loops to cover each number, but this …

Total answers: 2

Error while visualizing data with countplot?

Error while visualizing data with countplot? Question: enter image description here Since there is a categorical data in the picture here, it wants me to convert it, but I want to make the categorical data count i need to plot countplot of how many should be from which country but i get valuerror error Asked …

Total answers: 1

How to add a dataframe to another on python

How to add a dataframe to another on python Question: So I have 3 columns. ETA (eta/km*100) (a number), Climate, and month. My purpose is to drop the values higher that 0.95 quartile and lower than 0.05 (the extreme cases on this dataset) for each subset of 3 months and Climate, and the reagroup the …

Total answers: 1

Pandas Groupby only same ID and when column value is false

Pandas Groupby only same ID and when column value is false Question: I have the following problem I am trying to solve currently. A dataframe with a lot of numerical columns consisting out of a "serial_number" column that act as ID. A column "update" that is either True or False. And also some numerical columns …

Total answers: 1

Pandas – Irregular time series data – Compare row to next 8 hours of rows

Pandas – Irregular time series data – Compare row to next 8 hours of rows Question: Right now I am using pandas to analyze call center data. The data is structured as followed: call_time = pd.to_datetime([ ‘2020-01-01 01:00:00’, ‘2020-01-01 09:00:00’, ‘2020-01-01 01:00:00’, ‘2020-01-01 03:00:00’, ‘2020-01-01 04:00:00’, ‘2020-01-01 06:00:00’, ‘2020-01-01 01:00:00’, ‘2020-01-01 10:00:00’, ]) df = …

Total answers: 2

Apply a multiplication to random elements on my dataframe [Solved]

Apply a multiplication to random elements on my dataframe [Solved] Question: So what I want is to randomly chose a given amount of elements on my dataframe, and to those elements, apply an operation (which will be a multiplication by a number which will also be randomly chosen between a range) to an ‘eta’ column. …

Total answers: 2

How to count people who are below a position

How to count people who are below a position Question: I’m looking to count how many people are below a given user of the data frame. Employee Manager A – B A C A D A E A F B G B H C I C I would like to get in the output: I, …

Total answers: 2