How do you arrange similar names in a particular order by group?

I want to arrange a list of names in a particular order. For example, I have the following df: structure(list(group = c("A", "A", "A", "B", "B", "B", "C", "D", "D", "E", "E"), order = c(1, 2, 3, 1, 2, 3, 1, 1, 2, 1, 2), name = c("Kate M. Smith", "Kate Marie Smith", "Kate Smith",… Read More How do you arrange similar names in a particular order by group?

Python: Selecting days in-between with input date by user

I am trying to take some values from a Covid database and I wrote the following code which works as I want (see below) but I have a question for you after the code: import numpy as np import pandas as pd import matplotlib.pyplot as plt def main(): pd.set_option(‘display.max_rows’, None) df = pd.read_csv(‘https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_confirmed_global.csv’) df=df[df["Country/Region"]=="Italy"] df=df.drop(columns=["Province/State","Lat","Long","Country/Region"])… Read More Python: Selecting days in-between with input date by user