Skip to content

Tag: python

Post files, but endpoint limits 50 posts per minute

Good afternoon, i’m completely new to coding and i need some help, i splitted a json file into ~2800 smaller json files and need to post to a certain endpoint, however the limit of the endpoint is ~50 files per minute. Currently i have made this is python : The file names are json1 -> json2800 Curren…

Transpose and Groupby pandas Columns

I’m looking to transpose pandas columns and apply a Groupby How can I achieve this expected output ? Answer Use DataFrame.stack for reshape with remove missing values and count values by Series.value_counts, last Series.sort_index with Series.rename_axis and Series.reset_index for 2 columns DataFrame: E…

Generate Excel files for each of element in a column using Python

I want to generate Excel files for each of element in a column : I will describe what I want with pictures : I have an excel file like this: I want for each element of the column “FRUIT”, to be on a different excel file like this : excel-BANANA.xlsx : excel-CHERRY.xlsx : excel-APPLE.xlsx : Is it p…

Deleting the useless output files using Python

After I execute a python script from a particular directory, I get many output files but apart from 5-6 files I want to delete the rest from that directory. What I have done is, I have taken those 5-6 useful files inside a list and deleted all the other files which are not there in that list. Below is my