pydatafaker.school.create_students¶
-
pydatafaker.school.create_students(n=300, min_grade=1, max_grade=7)[source]¶ Create a DataFrame with fake student names and attributes.
- Parameters
n (int, optional) – The number of students to generate, by default 300.
min_grade (int, optional) – The minimum grade for a school, by default 1.
max_grade (int, optional) – The maximum grade for a school, by default 7.
- Returns
A DataFrame containing: student_id, name, grade, and teacher_id.
- Return type
pandas.DataFrame
Examples
>>> from pydatafaker import school >>> school.create_students() student_id name grade teacher_id 0 student_0001 Michael Peterson 7 <NA> 1 student_0002 Kimberly Ryan 6 <NA> 2 student_0003 Joseph Rodriguez 6 <NA> 3 student_0004 Brandon Reid 3 <NA> 4 student_0005 Mrs. Amanda Clark 4 <NA> .. ... ... ... ... 295 student_0296 Kayla Anderson 2 <NA> 296 student_0297 Nicholas Frederick 1 <NA> 297 student_0298 Jacqueline Spencer 3 <NA> 298 student_0299 Kelsey Acosta 1 <NA> 299 student_0300 Glenn Beck DVM 1 <NA> [300 rows x 4 columns]