Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 106445

Pandas is a Python data analysis library.

3 votes
1 answer
84 views

Creating names from URLs

import pandas as pd df = pd.DataFrame([['www.pandas.org','low'], ['www.python.org','high']], columns=['URL','speed']) print(df.head()) df['Name'] = df['URL'] print(df.head()) #set Name based … on substring in URL df.loc[df['Name'].str.contains("pandas", na=False), 'Name'] = "PANDAS" df.loc[df['Name'].str.contains("python|pitone", na=False), 'Name'] = "PYTHON" print(df.head()) …
shamalaia's user avatar
  • 294
3 votes
2 answers
289 views

rolling quarterly mean

import pandas as pd import numpy as np import time date_range = pd.date_range(start="2020-01-01", end="2023-12-31", freq='D') np.random.seed(0) volume_data = np.random.randint(100, 1000, size=len(date_range …
shamalaia's user avatar
  • 294