pd.options.display.max_rows = 4000
pd.set_option('max_colwidth', 0)
(0 = 'kein Limit')
df.to_csv('filename.csv')
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_csv.html
import pandas as pd
df = pd.read_csv("all_outlinks.csv")
dfx = df.loc[df['Type'].str.match('AHREF')]
dfx = dfx.loc[dfx['Destination'].str.contains('firefox',regex=False)]
dfx = dfx.loc[:,['Type','Source','Destination','Status Code']]
print (dfx)
- Import CSV
- Select only rows where value in column "Type" matches "AHREF"
- Select only rows where value in column "Destination" contains "firefox" (default=regex)
- Return all rows (":") with selected columns ['Type','Source','Destination','Status Code']