Data analysis with Python

Data analysis with Python

Environment construction (Python 2)

Create a virtual environment

Create the following file in yml format.

name: virtual environment name (here py2) dependencies: Required package list

name: py2
    - conda-forge
    - python=2.7
    - xarray
    - netCDF4
    - seaborn
    - numpy
    - matplotlib
    - scipy
    - pip:
        - cyordereddict
        - sqlalchemy
        - model-organization

After that, create a new virtual environment and activate it with the following command.

$ conda env create -f environment.yml
$ source /home/user-name/.pyenv/versions/anaconda3-4.1.0/envs/py2/bin/activate py2
(If you do not specify activate with the full path, it may fail.)

If you are building a Python environment with Anaconda but the package you want is not in conda

$ source activate <anaconda environment name>
$ pip install <Module name>

Checking the existing environment name The default is root

$ conda info --envs

jupyter notebook

Specify the port number of localhost and start it.

$ jupyter notebook --port xxxx

Alternatively, edit the jupyter notebook settings. c. Comment out NotebookApp.port and set the port number.

$ .jupyter/
c.NotebookApp.port = xxxx

Profile settings

If you have not created a profile, create it with the following command

$ ipython profile create

This will ~/.ipython/profile_default/ Is created.

If you edit as follows,% matplotlib inline will be loaded at startup, and the matplotlib graph will be displayed inline.

# lines of code to run at IPython startup.
# c.InteractiveShellApp.exec_lines = traitlets.Undefined
c.InteractiveShellApp.exec_lines = ['%matplotlib inline']

Recommended Posts

Data analysis with python 2
Data analysis with Python
Data analysis starting with python (data visualization 1)
Data analysis starting with python (data visualization 2)
Data analysis using Python 0
Data analysis overview python
Voice analysis with python
Python data analysis template
Voice analysis with python
Data analysis starting with python (data preprocessing-machine learning)
Sample data created with python
My python data analysis container
[Python] Morphological analysis with MeCab
[Co-occurrence analysis] Easy co-occurrence analysis with Python! [Python]
Python for Data Analysis Chapter 4
Get Youtube data with python
Sentiment analysis with Python (word2vec)
[Python] Notes on data analysis
Planar skeleton analysis with Python
Japanese morphological analysis with Python
Python for Data Analysis Chapter 2
Data analysis using python pandas
Python for Data Analysis Chapter 3
Read json data with python
Data analysis for improving POG 1 ~ Web scraping with Python ~
Reading Note: An Introduction to Data Analysis with Python
Data analysis environment construction with Python (IPython notebook + Pandas)
Challenge principal component analysis of text data with Python
3D skeleton structure analysis with Python
Python: Time Series Analysis: Preprocessing Time Series Data
Impedance analysis (EIS) with python []
[Python] Get economic data with DataReader
Text mining with Python â‘  Morphological analysis
Python data structures learned with chemoinformatics
Preprocessing template for data analysis (Python)
Easy data visualization with Python seaborn.
Process Pubmed .xml data with python
Logistic regression analysis Self-made with python
Python application: Data cleansing # 2: Data cleansing with DataFrame
FizzBuzz with Python3
Scraping with Python
Statistics with python
Data analysis Titanic 2
Scraping with Python
Python with Go
Twilio with Python
Integrate with Python
Play with 2016-Python
AES256 with python
Tested with Python
python starts with ()
Data analysis Titanic 1
with syntax (Python)
Bingo with python
Zundokokiyoshi with python
Data analysis Titanic 3
Excel with Python
[python] Read data
Microcomputer with Python
Cast with python
Get additional data in LDAP with python