Importing a CSV file into Spyder from a mac

时间:2018-05-06 17:07:39

标签: python pandas spyder

I'm just getting started with learning how utilize Spyder. I'm utilizing a mac to do so, if that makes any difference. I'm having a horrible time opening up a csv file on my computer. I'm wondering if someone can tell me what I'm doing wrong?

Here's the code I'm using:

sudo python setup.py install

I get the following error when I execute the statements:

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb0 in position 592: invalid start byte

1 个答案:

答案 0 :(得分:0)

Try to use different encoding -

function start_playlist(){
    return ' <ul id="playlist">';

}

function stop_playlist(){

    return '  </ul>';
}

function add_to_playlist($atts){
      $a = shortcode_atts( array(
        'src'=> '',
        'name'=>''
    ), $atts );

    //return '  <li><a href="#" c="'.$a['src'].'" onclick="'."load_playlist('".$a['src']."')".'">'.$a['name'].'</a></li>';
    return '  <li><a href="#" onclick="'."load_playlist('".$a['src']."')".'">'.$a['name'].'</a></li>';
}
add_shortcode( 'aaplayer', 'player' );

add_shortcode( 'startaap', 'start_playlist' );
add_shortcode( 'stopaap', 'stop_playlist' );
add_shortcode( 'addpl', 'add_to_playlist' );



//add jquery
function include_jQuery() {
    if (!is_admin()) {
        // comment out the next two lines to load the local copy of jQuery
        wp_deregister_script('jquery'); 
        wp_register_script('jquery', plugins_url( '/jquery183.js' , __FILE__ ), false, '1.8.3'); 
        wp_enqueue_script('jquery');
    }
}
add_action('init', 'include_jQuery');