Skip to content

pandas

Memorize

TODO

Create a basic data frame

>>> d = {'col1': [1, 2], 'col2': [3, 4]}
>>> df = pd.DataFrame(data=d)
>>> df
   col1  col2
0     1     3
1     2     4

display(df)

Aggregate strings

How to Count Duplicates in Pandas DataFrame - Data to Fish

Create a dataframe

import pandas as pd
d = {'col1': [1, 2], 'col2': [3, 4]}
df = pd.DataFrame(data=d)
df

pandas.DataFrame — pandas 1.4.0 documentation

Select n=3 off front

final_df.head(3)

Select n=3 off back

final_df.tail(3)

Import CSV

df = pd.read_csv('./my.csv')

Select Columns

Errors

Read Software.List.Python

json - How to open .ndjson file in Python? - Stack Overflow

Query Data

Sort

  • [[https://cassandra.apache.org/doc/trunk/cassandra/data_modeling/data_modeling_rdbms.html#sorting-is-a-design-decision]]

Can only append a Series if ignore_index=True or if the Series has a name

  • [[MyDendronExistence/Knowledge/Programing Language/python|Software.List.Python]]