Skip to content

Tag: pandas

Pandas: Get year to date dates from previous year

I want to compare the dates ranging from January 1st till the current day, from this year versus from last year. example: get the rows with dates ranging from january 1st till november 29th 2020 get the rows with dates ranging from january 1st till november 29th 2021 here is what I have tryed doing, and the o…

Python pandas extract data from nested list

For a personal project, I’m calling data from the Google Books API and uploading the fields I want to mySQL. I’ve successfully made the API request and received data. The data received is nested and i want to place this in a dataframe. Now my code works with the “first” column (no inde…

Degeneracy given a graph

An exercise requires to determine the degenerative level of a graph. To do that, I have found useful the following code (source: https://www.geeksforgeeks.org/find-k-cores-graph/) which represents an undirected graph using adjacency list representation An example of data that I am using for building a graph i…