We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change Jupyter display defaults: pd.set_option('display.max_columns', 1000)
import importlib solveutils = importlib.reload(solveutils)
#importing from a different directory import sys sys.path.insert(0, "../libraries") import solveutils
Drop all the duplicate rows (as in all copies of duplicates, including the originals) from a data frame: df[~df.duplicated(keep=False)]
Get the type of a column: dftweet['user'].apply(type)
#dump json to an output file import json with open('rawdata.json', 'w') as fout: json.dump(rawdata, fout, ensure_ascii=False)
myheaders = { 'User-Agent': 'SJtest/1.0; +https://example.com', 'Accept': 'text/plain', } r = requests.get('https://100percentfedup.com/ads.txt', headers=myheaders) r
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Change Jupyter display defaults:
pd.set_option('display.max_columns', 1000)
Reload a library in Python3.4 onwards:
import importlib
solveutils = importlib.reload(solveutils)
#importing from a different directory
import sys
sys.path.insert(0, "../libraries")
import solveutils
Drop all the duplicate rows (as in all copies of duplicates, including the originals) from a data frame: df[~df.duplicated(keep=False)]
Get the type of a column: dftweet['user'].apply(type)
#dump json to an output file
import json
with open('rawdata.json', 'w') as fout:
json.dump(rawdata, fout, ensure_ascii=False)
Sometimes you have to ask nicely for data (in this case, not adding headers got me a 403 error)
myheaders = {
'User-Agent': 'SJtest/1.0; +https://example.com',
'Accept': 'text/plain',
}
r = requests.get('https://100percentfedup.com/ads.txt',
headers=myheaders)
r
The text was updated successfully, but these errors were encountered: