create a data frame with column sessiontype, paidamount, attendance, Id and having 10…
- User
create a data frame with column session_type, paid_amount, attendance, Id and having 10 records
- Assistant
import pandas as pd import random
Create a DataFrame with 10 random records
data = { 'session_type': ['Session A', 'Session B', 'Session C', 'Session D', 'Session E', 'Session F', 'Session G', 'Session H', 'Session I', 'Session J'], 'paid_amount': [random.randint(10, 50) for _ in range(10)], 'attendance': [random.randint(0, 1) for _ in range(10)], 'Id': [i for i in range(1, 11)] }
df = pd.DataFrame(data) print(df)
- User
create a data frame with column session_type, paid_amount, attendance, Id and having 10 records, session_type values can be lyra_therapy_session, alcohol_use_disorder_session, bcc, paid amount can be 270,317,288, 261
- Assistant
import pandas as pd
Define the data
data = { 'session_type': ['lyra_therapy_session', 'alcohol_use_disorder_session', 'bcc', 'lyra_therapy_session', 'bcc', 'alcohol_use_disorder_session', 'bcc', 'lyra_therapy_session', 'lyra_therapy_session', 'alcohol_use_disorder_session'], 'paid_amount': [270, 317, 288, 261, 270, 317, 288, 261, 270, 317], 'attendance': [random.randint(0, 1) for _ in range(10)], 'Id': [i for i in range(1, 11)] }
Create DataFrame
df = pd.DataFrame(data) print(df)
- User
create a data frame with column session_type, paid_amount, attendance, Id and having 10 records, session_type values can be lyra_therapy_session, alcohol_use_disorder_session, bcc, paid amount can be 270,317,288, 261 and attendance value is attended
- Assistant
import pandas as pd
Define the data
data = { 'session_type': ['lyra_therapy_session', 'alcohol_use_disorder_session', 'bcc', 'lyra_therapy_session', 'bcc', 'alcohol_use_disorder_session', 'bcc', 'lyra_therapy_session', 'lyra_therapy_session', 'alcohol_use_disorder_session'], 'paid_amount': [270, 317, 288, 261, 270, 317, 288, 261, 270, 317], 'attendance': ['attended'] * 10, 'Id': [i for i in range(1, 11)] }
Create DataFrame
df = pd.DataFrame(data) print(df)