extract Kaggle files by using flask API in python

I am creating an API using Python Flask API. below is the kaggle url which I am extracting. https://www.kaggle.com/datasets/alphiree/cardiovascular-diseases-risk-prediction-dataset?select=CVD_cleaned.csv Below is the script which I am using. I am passing parameters through API to extract the kaggle csv public file. from flask import Flask, request, jsonify import pandas as pd from kaggle.api.kaggle_api_extended import KaggleApi app… Read More extract Kaggle files by using flask API in python

Function turns Values to NaN unwanted

I wrote a function to fill NaN with Values, but instead this function first fills the NaN with values and then deletes every value that was in the list before I did the function def preprocessing(df): median_male_3= df[(df["Sex"]=="male") & (df["Pclass"] ==3 )]["Age"].median() median_male_2= df[(df["Sex"]=="male") & (df["Pclass"] ==2 )]["Age"].median() median_male_1= df[(df["Sex"]=="male") & (df["Pclass"] ==1 )]["Age"].median() median_female_3=… Read More Function turns Values to NaN unwanted

How to get Maximum points scored by which player in each year?

I have a Data set like this – Name Point Year Player1 498.0 2010 Player2 454.0 2010 Player1 396.0 2011 Player3 214.0 2011 player2 163.0 2011 Now I want to see which Player scored the maximum point in each year. I tried this – Maximum_score = df.groupby([‘Year’])[‘Point’].max() and got the result – Year 2010 498.0… Read More How to get Maximum points scored by which player in each year?