About Lesson
More detailed Tips and Tricks to use Pandas
Join the conversation
1. **survived**:
- **Type**: Integer (0 or 1)
- **Meaning**: Whether the passenger survived (1) or did not survive (0).2. **pclass**:
- **Type**: Integer (1, 2, or 3)
- **Meaning**: Passenger class, where 1 is the first class, 2 is the second class, and 3 is the third class. It represents socioeconomic status.3. **sex**:
- **Type**: String (male or female)
- **Meaning**: The gender of the passenger.4. **age**:
- **Type**: Float
- **Meaning**: The age of the passenger in years. Some values may be missing.5. **sibsp**:
- **Type**: Integer
- **Meaning**: The number of siblings or spouses the passenger had aboard the Titanic. This represents family connections onboard.6. **parch**:
- **Type**: Integer
- **Meaning**: The number of parents or children the passenger had aboard the Titanic.7. **fare**:
- **Type**: Float
- **Meaning**: The fare the passenger paid for their ticket.8. **embarked**:
- **Type**: String (C, Q, or S)
- **Meaning**: The port where the passenger embarked:
- **C** = Cherbourg
- **Q** = Queenstown
- **S** = Southampton9. **class**:
- **Type**: Categorical
- **Meaning**: A duplicate of `pclass` but in string format: first, second, or third class.10. **who**:
- **Type**: String
- **Meaning**: Whether the passenger is a man, woman, or child.11. **adult_male**:
- **Type**: Boolean (True or False)
- **Meaning**: Whether the passenger is an adult male.12. **deck**:
- **Type**: Categorical (A, B, C, D, E, F, G, or NaN)
- **Meaning**: The deck where the passenger's cabin was located. Some values may be missing.13. **embark_town**:
- **Type**: String
- **Meaning**: The name of the town where the passenger embarked.14. **alive**:
- **Type**: String (yes or no)
- **Meaning**: Whether the passenger survived or not, similar to the `survived` column but in a string format.15. **alone**:
- **Type**: Boolean (True or False)
- **Meaning**: Whether the passenger was traveling alone or with family.
Reply
done...
Reply
titanic dataset info: Indicates whether the passenger survived (1) or did not survive (0). pclass: Passenger class (1 = 1st class, 2 = 2nd class, 3 = 3rd class). sex: Gender of the passenger. age: Age of the passenger. sibsp: Number of siblings or spouses aboard the Titanic. parch: Number of parents or children aboard the Titanic. fare: Passenger fare. cabin: Cabin number. embarked: Port of embarkation (C = Cherbourg, Q = Queenstown, S = Southampton). who: Describes whether the passenger is a child, woman, or man. deck: The deck where the passenger's cabin is located. embark_town: The name of the town where the passenger boarded the ship. alive: Indicates whether the passenger survived or not (yes or no). alone: Indicates whether the passenger was traveling alone (1) or not (0). class: Indicates the passenger class in a string format (First, Second, Third)...
Reply
15
Reply
titanic dataset info
survived: Indicates whether the passenger survived (1) or did not survive (0).
pclass: Passenger class (1 = 1st class, 2 = 2nd class, 3 = 3rd class).
sex: Gender of the passenger.
age: Age of the passenger.
sibsp: Number of siblings or spouses aboard the Titanic.
parch: Number of parents or children aboard the Titanic.
ticket: Ticket number.
fare: Passenger fare.
cabin: Cabin number.
embarked: Port of embarkation (C = Cherbourg, Q = Queenstown, S = Southampton).
who: Describes whether the passenger is a child, woman, or man.
deck: The deck where the passenger's cabin is located.
embark_town: The name of the town where the passenger boarded the ship.
alive: Indicates whether the passenger survived or not (yes or no).
alone: Indicates whether the passenger was traveling alone (1) or not (0).
class: Indicates the passenger class in a string format (First, Second, Third).
Reply
done
Reply
Q1.
what every column mean here in kashti data set?
ANSWER:
1. Survived: Indicates whether the passenger survived (0 = No, 1 = Yes).
2. Pclass: Represents the passenger class (1st, 2nd, or 3rd).
3. Sex: Gender of the passenger.
4. Age: Age of the passenger.
5. SibSp: Number of siblings or spouses aboard the Titanic for each passenger.
6. Parch: Number of parents or children aboard the Titanic for each passenger.
7. Fare: The amount paid for the ticket by each passenger.
8. Embarked: Denotes the port of embarkation (C = Cherbourg, Q = Queenstown, S = Southampton).
9. Class: Similar to 'Pclass', it denotes the passenger class.
10. Who: Indicates the category of the person (child, woman, man).
11. Adult_male: Binary value indicating whether the person is an adult male (True/False).
12. Deck: Represents the deck where the passenger's cabin was located.
13. Embark_town: Another representation of the port of embarkation (Cherbourg, Queenstown, Southampton).
14. Alive: Indicates whether the passenger survived (Yes/No).
15. Alone: Binary value indicating whether the passenger was traveling alone (True/False).Q2.
how many datasets are there in sns.load_dataset()? and how to fetch them?
ANSWER:1. 'anscombe': Anscombe's quartet dataset.
2. 'attention': Reaction times in a psychological experiment dataset.
3. 'brain_networks': Network measures for human brain functional networks.
4. 'car_crashes': US car crash dataset.
5. 'diamonds': Diamond characteristics dataset.
6. 'dots': Lateral geniculate nucleus response to light stimuli dataset.
7. 'exercise': Results from fitness tracking dataset.
8. 'flights': Passengers on airline flights dataset.
9. 'fmri': Functional Magnetic Resonance Imaging (fMRI) dataset.
10. 'gammas': Simulated neuroimaging data.
11. 'iris': Iris flower dataset.
12. 'mpg': Miles per gallon of various car models dataset.
13. 'planets': Exoplanets discovery dataset.
14. 'tips': Restaurant tips dataset.
15. 'titanic': Titanic dataset.
Reply
day 9 assignmentName: Muhammad Daniyalwhat is nan? how much its important? and why its availiblity and not availibility is important?What is NaN?NaN stands for "Not a Number" and is a special value used in programming to represent an undefined or unrepresentable numerical value. It is commonly used in floating-point arithmetic, which is the standard way of representing numbers in computers.Why is NaN important?NaN is important because it allows programmers to handle invalid numerical operations in a controlled and predictable way. Without NaN, invalid operations would often cause programs to crash or produce unexpected results. For example, if a program tries to divide 0 by 0, the result would be NaN. This is important because there is no real number that is equal to 0 divided by 0.NaN is also important for representing values that are not numbers, such as infinity. For example, the square root of a negative number is not a real number, so it is represented by NaN.Why is the availability and non-availability of NaN important?The availability of NaN is important because it allows programmers to write more robust and reliable code. By using NaN to represent invalid or unrepresentable values, programmers can avoid crashes and unexpected results.The non-availability of NaN can also be important in some cases. For example, if a program is performing a numerical calculation that is expected to always produce a valid result, then the presence of NaN can indicate that there is a problem with the calculation.In general, NaN is a valuable tool for programmers, and its availability and non-availability can both be important depending on the specific application.
Reply
this is very good to learn data science, being a jobian and potential student of PhD, I am learning a lot from you Sir, May Allah bless you, Jazak Allah
Reply
save to excel : phool.to_excel('phool.xlsx')
kashti.to_excel('kashti.xlsx')
Reply