programming:python:pandas
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
programming:python:pandas [2023/07/20 02:10] – levor | programming:python:pandas [2023/07/20 07:32] (current) – levor | ||
---|---|---|---|
Line 11: | Line 11: | ||
| drop() | new_df = df.drop(' | | drop() | new_df = df.drop(' | ||
| equals() | same_data_b = df1.equals(df2) | function that returns a boolean, True if dataframes have the same information, | | equals() | same_data_b = df1.equals(df2) | function that returns a boolean, True if dataframes have the same information, | ||
- | | columns.get_loc() | example | get integer location of column, by its name | | + | | columns.get_loc() | (example?) | get integer location of column, by its name | |
- | | index.get_loc() | example | get integer location of row, by its name | | + | | index.get_loc() | (example?) | get integer location of row, by its name | |
- | | .sort_values(column_name) | output_df = df.sort_values(by=[col_name_1, | + | | .sort_values(column_name) | output_df = df.sort_values(col_name)\\ |
import pandas | import pandas | ||
programming/python/pandas.1689819055.txt.gz · Last modified: 2023/07/20 02:10 by levor