開始行:
[[FrontPage/Python/Scipy+Numpy]]
** Pandas [#n923875a]
** ipython: 表示する行数を設定 [#l5a41af2]
pd.options.display.max_rows=5
** 信号データの呼び出し [#hc4ec7ef]
https://gist.github.com/peace098beat/76005a2eb8448dea008c
# In[4]:
import pandas as pd
import numpy as np
# In[39]:
import os
import sys
# In[40]:
pd.options.display.max_rows=5
# In[41]:
# カレントパスの取得
BASE_DIR = os.path.dirname(sys.argv[0])
# パスの追加
sys.path.append('E:\Python\GolfClassification/')
# In[42]:
from FiSig.AudioManager import AudioManager
# In[82]:
audiofile_path_s = ['./wav/audio1.wav', './wav/audio2.wa...
audiofile_path_s
# In[84]:
audiofile_basename_s = [os.path.basename(path) for path ...
audiofile_basename_s
# In[86]:
audioname_s = [os.path.splitext(basename)[0] for basenam...
audioname_s
# In[87]:
audio_manager_s = [AudioManager(f) for f in audiofile_pa...
# In[88]:
audio_data_s = [am.getData(mode='norm') for am in audio_...
audio_data_s
# In[89]:
fs = audio_manager_s[0].getFs()
# In[90]:
N = audio_data_s[0].shape[0]
N
# ## PandasのDataFrameを使ってみる
# In[94]:
table_dict = dict(zip(audioname_s, audio_data_s))
table_dict
# In[95]:
trange = np.linspace(0, N/float(fs), N)
trange.shape
# In[96]:
df = pd.DataFrame(table_dict, trange)
df
# In[98]:
df[[1]]
終了行:
[[FrontPage/Python/Scipy+Numpy]]
** Pandas [#n923875a]
** ipython: 表示する行数を設定 [#l5a41af2]
pd.options.display.max_rows=5
** 信号データの呼び出し [#hc4ec7ef]
https://gist.github.com/peace098beat/76005a2eb8448dea008c
# In[4]:
import pandas as pd
import numpy as np
# In[39]:
import os
import sys
# In[40]:
pd.options.display.max_rows=5
# In[41]:
# カレントパスの取得
BASE_DIR = os.path.dirname(sys.argv[0])
# パスの追加
sys.path.append('E:\Python\GolfClassification/')
# In[42]:
from FiSig.AudioManager import AudioManager
# In[82]:
audiofile_path_s = ['./wav/audio1.wav', './wav/audio2.wa...
audiofile_path_s
# In[84]:
audiofile_basename_s = [os.path.basename(path) for path ...
audiofile_basename_s
# In[86]:
audioname_s = [os.path.splitext(basename)[0] for basenam...
audioname_s
# In[87]:
audio_manager_s = [AudioManager(f) for f in audiofile_pa...
# In[88]:
audio_data_s = [am.getData(mode='norm') for am in audio_...
audio_data_s
# In[89]:
fs = audio_manager_s[0].getFs()
# In[90]:
N = audio_data_s[0].shape[0]
N
# ## PandasのDataFrameを使ってみる
# In[94]:
table_dict = dict(zip(audioname_s, audio_data_s))
table_dict
# In[95]:
trange = np.linspace(0, N/float(fs), N)
trange.shape
# In[96]:
df = pd.DataFrame(table_dict, trange)
df
# In[98]:
df[[1]]
ページ名: