發表文章

目前顯示的是 12月 13, 2018的文章

RBAC for mobile application

圖片
up vote 0 down vote favorite I have a scenario for a company creating a mobile application will provide the users with a list of food outlets which: i) serve one or more of the preferred food types that specified by the user, ii) are currently open and iii) deliver to the location of the user. Additionally, food outlets will be provided with periodic usage summaries that include details of user queries for which their outlet was returned. What kind of roles I can assign to the users within this scenario. security mobile rbac share | improve this question asked Nov 11 at 19:25 Memo 1 2 add a comment  |  up vote 0 down vote favorite I have a scenario for a company creating a mobile application will provide the users with a list of food outlets which: i) serve one or more of the preferred food types that specified by the user, ii) are currently open and iii) deliver to the location of the user. Additionally, food outlets will be

Pandas dataframe narrow to wide with pivot table no aggregation

圖片
up vote 2 down vote favorite 1 I have a pandas dataframe that contains the iris dataset. I want to subset this dataframe to only include sepal_length and species , and then reshape it so that the columns are the unique values for species and the values are the values for that species. # load data into a dataframe df = pd.read_csv('https://raw.githubusercontent.com/mwaskom/seaborn-data/master/iris.csv') head(df) +----+---------------+--------------+---------------+--------------+---------+ | | sepal_length | sepal_width | petal_length | petal_width | species | +----+---------------+--------------+---------------+--------------+---------+ | 0 | 5.1 | 3.5 | 1.4 | 0.2 | setosa | | 1 | 4.9 | 3.0 | 1.4 | 0.2 | setosa | | 2 | 4.7 | 3.2 | 1.3 | 0.2 | setosa | | 3 | 4.6 | 3.1 | 1.5 | 0.2 | setosa | | 4 | 5.0 | 3.6 | 1.4 | 0.2 | setosa | +----+---------------+--------------+---------------+--------------+---------+ I can do this is I take the data out of Pandas as use a di