



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A concise overview of packages and dataframes in python, focusing on their structure, importing techniques, and manipulation methods. It covers essential concepts such as importing specific modules, handling module name collisions, and utilizing the python standard library. Additionally, it delves into numpy arrays, indexing, slicing, and dataframe operations like loading, accessing, filtering, adding/removing columns, merging, concatenating, handling null values, aggregating data, cumulative sums, rolling windows, ranking, and shifting data. The document also touches on the pyarrow backend for optimized pandas performance, offering a foundational understanding for data analysis and scientific computing in python. Useful for students and professionals alike, offering a quick reference to key concepts and techniques in python data handling. (438 characters)
Typology: Exams
1 / 7
This page cannot be seen from the preview
Don't miss anything!




Understanding Packages and DataFrames in Python Latest Update
Packages Directories that can be imported to give access to all modules stored in the directory.
Subpackages Modules contained within a package that can be accessed via dot notation once they are imported.
Import Statement A command used to import a package by specifying the directory of the package.
init.py A file that identifies a directory as a package; it may be empty or include import statements.
ASCIIArt Package A package that contains a module 'canvas' and subpackages 'figures' and 'buildings.'
Importing Specific Modules The process of importing individual subpackages by specifying the path.
from Technique A method that allows individual modules or subpackages to be directly imported into the global namespace.
Module Name Collisions
Situations where modules with the same name exist in different packages, which can be avoided using packages.
Python Standard Library A collection of modules included by default, providing utilities and tools for common program behaviors.
datetime Module A standard library module used to provide date details based on user-entered future days.
random Module A standard library module used to implement a simple game with a deck of cards that continues until an ace is drawn.
Importing Packages The process of bringing in external libraries or modules into a Python script using the import statement.
Importing with Alias A method to give a package a different name during import, e.g., 'import scipy as sp.'
Importing Multiple Modules The ability to import multiple modules or all modules from a package using specific syntax.
Example of Importing Canvas Module An example of how to import the canvas module from the ASCIIArt package.
Module 'canvas.py' An example of a module that can exist in different packages without conflict.
Numpy Core library for scientific computing in Python.
Numpy Array Grid of values, all of the same type.
Indexing Access elements using nonnegative integer tuples.
Shape Tuple indicating size of array dimensions.
Dtype Data type of elements in a numpy array.
Zeros Matrix Matrix filled with zeros of specified size.
Ones Matrix Matrix filled with ones of specified size.
Slicing Extracting subarrays using index ranges.
DataFrame Two-dimensional labeled data structure in Pandas.
Loading Data Importing data from various file formats.
Accessing Data Manipulating and inspecting DataFrame content.
Filtering Data
Cumulative Sum Running total of a specified column.
Rolling Window Calculating statistics over a moving window.
Ranking Assigning ranks based on column values.
Shift Shifting data in a column by specified periods.
PyArrow Backend Optimized performance for certain Pandas operations.